Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Tue Oct 22, 2019 8:52 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
PostPosted: Tue Jul 08, 2014 7:34 am 
Offline
Contributor

Joined: Wed Apr 07, 2010 8:04 am
Posts: 105
Location: Boston, MA
Upgrading from 1.1 to 1.3.2, I got the following message.

Code:
Error Number: 1060

Duplicate column name 'memory_serial'

ALTER TABLE sys_hw_memory ADD memory_serial varchar(100) NOT NULL default ''

Filename: C:\wamp\www\code_igniter\system\database\DB_driver.php

Line Number: 330

_________________
Old OA Setup: 500 Windows 7 workstations & 200 Apple OSX with OA v1.5.2 on Windows Server 2003 and WAMP 2
New OA Setup: 100 Windows servers with OA 2.2 on Windows Server 2016 and WAMP 3


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 08, 2014 11:10 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
I cannot replicate this.
I installed 1.1 on Windows, audited a Windows PC, then installed 1.3.2.
Once 1.3.2 was installed, I upgraded the database as per the web page (in Open-AudIT).
Result of upgrade is below.
You will see the line - ALTER TABLE sys_hw_memory ADD memory_serial varchar(100) NOT NULL default '' , which worked just fine.
I'm guessing that for some reason memory_serial already existed in your database...
You could try commenting out that line in open-audit/code_igniter/application/controllers/admin.php and re-running the upgrade.

If you have a heavily customised version and that column is indeed in the database, then that's what Opmantek professional support is for :-)


Code:
Upgrade Message

New (now current) database version: 1.3.2 (20140515)
Don't forget to use the new audit scripts!


Database Queries

UPDATE oa_location set location_name = 'Default Location', location_type = 'Office', location_city = 'Gold Coast', location_state = 'Queensland', location_country = 'Australia', location_latitude = '-28.017260', location_longitude = '153.425705', location_icon = 'office' WHERE location_id = '0'

INSERT INTO oa_group (group_id, group_name, group_dynamic_select, group_parent, group_description, group_category, group_icon) VALUES (NULL, 'Items in Default Location', 'SELECT distinct(system.system_id) FROM system WHERE system.man_location_id = \'0\' AND system.man_status = \'production\'', '1', 'Items in Default Location', 'location', 'location')

INSERT INTO oa_group_user (SELECT NULL, user_id, 3, '10' FROM oa_user WHERE user_admin = 'y')

UPDATE oa_location SET location_group_id = 3 WHERE location_id = '0'

UPDATE oa_config set config_value = '/omk/oae' WHERE config_name = 'oae_url'

UPDATE oa_config set config_value = '/omk/oae/map' WHERE config_name = 'maps_url'

UPDATE oa_config set config_description = 'The web server address of NMIS.' WHERE config_name = 'nmis_url'

SELECT config_value FROM oa_config WHERE config_name = 'nmis_url'

UPDATE oa_config set config_value = '' WHERE config_name = 'nmis_url'

UPDATE oa_config set config_value = '20140126', config_editable = 'n', config_description = 'The internal numerical version.' WHERE config_name = 'internal_version'

UPDATE oa_config set config_value = '1.1.1', config_editable = 'n', config_description = 'The version shown on the web pages.' WHERE config_name = 'display_version'


NOTE Please click this link (or go to Admin -> List Groups) and update (icon on the right) the new Group for 'Items in Default Location'.
ALTER TABLE sys_hw_memory ADD memory_serial varchar(100) NOT NULL default ''

ALTER TABLE sys_sw_netstat CHANGE protocol protocol enum('tcp', 'udp', 'tcp6', 'udp6', 'tcp4', 'udp4', '') NOT NULL default ''

ALTER TABLE sys_sw_software ADD software_description text NOT NULL default ''

INSERT INTO oa_config (config_name, config_value, config_editable, config_description) VALUES ('default_windows_username', '', 'y', 'The default username used by Open-AudIT to audit Windows PCs.')

INSERT INTO oa_config (config_name, config_value, config_editable, config_description) VALUES ('default_windows_password', '', 'y', 'The default password used by Open-AudIT to audit Windows PCs.')

INSERT INTO oa_config (config_name, config_value, config_editable, config_description) VALUES ('default_windows_domain', '', 'y', 'The default active directory domain used by Open-AudIT to audit Windows PCs.')

INSERT INTO oa_config (config_name, config_value, config_editable, config_description) VALUES ('default_ssh_username', '', 'y', 'The default username used by Open-AudIT to audit devices via SSH.')

INSERT INTO oa_config (config_name, config_value, config_editable, config_description) VALUES ('default_ssh_password', '', 'y', 'The default password used by Open-AudIT to audit devices via SSH.')

INSERT INTO oa_config (config_name, config_value, config_editable, config_description) VALUES ('default_network_address', '', 'y', 'The ip address or resolvable hostname used by external devices to talk to Open-AudIT.')

UPDATE oa_config SET config_value = 'y' WHERE config_name = 'name_match'


NOTE The configuration item name_match has been set to "y". This is for the new discovery features. If you do not wish to match devices based on their hostname, please go to Admin -> Config and change it to "n". UPDATE oa_config SET config_name = 'default_snmp_community' WHERE config_name = 'snmp_default_community'

CREATE TABLE oa_temp ( temp_id int(10) unsigned NOT NULL auto_increment, temp_name text NOT NULL, temp_value text NOT NULL, temp_timestamp datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (temp_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8

INSERT INTO oa_config (config_name, config_value, config_editable, config_description) VALUES ('show_snmp_community', 'y', 'y', 'Show the SNMP community string on forms.')

INSERT INTO oa_config (config_name, config_value, config_editable, config_description) VALUES ('show_passwords', 'y', 'y', 'Show any passwords on forms.')

UPDATE oa_config SET config_value = '20140204', config_editable = 'n', config_description = 'The internal numerical version.' WHERE config_name = 'internal_version'

UPDATE oa_config SET config_value = '1.2', config_editable = 'n', config_description = 'The version shown on the web pages.' WHERE config_name = 'display_version'

UPDATE oa_config set config_value = '20140228', config_editable = 'n', config_description = 'The internal numerical version.' WHERE config_name = 'internal_version'

UPDATE oa_config set config_value = '1.2.1', config_editable = 'n', config_description = 'The version shown on the web pages.' WHERE config_name = 'display_version'

ALTER TABLE sys_hw_processor ADD processor_count int(2) unsigned NOT NULL default '0'

ALTER TABLE sys_hw_processor ADD processor_logical int(2) unsigned NOT NULL default '0'

We need to upgrade the open-audit_enterprise user to admin level because it needs to read the config to populate the discovery page in Open-AudIT Enterprise.

UPDATE oa_user SET user_admin = 'y' WHERE user_name = 'open-audit_enterprise'

UPDATE oa_config set config_value = '20140403', config_editable = 'n', config_description = 'The internal numerical version.' WHERE config_name = 'internal_version'

UPDATE oa_config set config_value = '1.3', config_editable = 'n', config_description = 'The version shown on the web pages.' WHERE config_name = 'display_version'

UPDATE oa_config set config_value = '20140501', config_editable = 'n', config_description = 'The internal numerical version.' WHERE config_name = 'internal_version'

UPDATE oa_config set config_value = '1.3.1', config_editable = 'n', config_description = 'The version shown on the web pages.' WHERE config_name = 'display_version'

ALTER TABLE sys_hw_network_card_ip ADD net_index varchar(10) NOT NULL default ''

INSERT INTO oa_config (config_name, config_value, config_editable, config_description) VALUES ('rss_enable', 'y', 'y', 'Enable the RSS feed.')

INSERT INTO oa_config (config_name, config_value, config_editable, config_description) VALUES ('rss_url', 'https://community.opmantek.com/rss/OA.xml', 'y', 'The RSS feed URL.')

ALTER TABLE system CHANGE man_class man_class enum('desktop','laptop','tablet','workstation','server','virtual server','virtual desktop','','hypervisor') NOT NULL default ''

CREATE TABLE sys_sw_virtual_machine ( id int(10) unsigned NOT NULL auto_increment, system_id int(10) unsigned default NULL, guest_system_id int(10) unsigned default NULL, name varchar(100) NOT NULL default '', vm_id int(12) unsigned NOT NULL default '0', vm_group text NOT NULL default '', config_file text NOT NULL default '', uuid text NOT NULL default '', memory int(12) unsigned NOT NULL default '0', cpu int(10) unsigned NOT NULL default '0', status varchar(100) NOT NULL default '', timestamp datetime NOT NULL default '0000-00-00 00:00:00', first_timestamp datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (id), KEY system_id (system_id), CONSTRAINT sys_sw_virtual_machine_system_id FOREIGN KEY (system_id) REFERENCES system (system_id) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8

UPDATE oa_config set config_value = '20140515', config_editable = 'n', config_description = 'The internal numerical version.' WHERE config_name = 'internal_version'

UPDATE oa_config set config_value = '1.3.2', config_editable = 'n', config_description = 'The version shown on the web pages.' WHERE config_name = 'display_version'

_________________
Support and Development hours available from Opmantek.
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jul 10, 2014 2:42 am 
Offline
Contributor

Joined: Wed Apr 07, 2010 8:04 am
Posts: 105
Location: Boston, MA
I think I figure it out.
My first attempt to upgrade failed, I think due to having very large tables in software, services and alerts, maybe the query might have timed out.

Anyways, when I tried to run the upgrade again that's what I got, I deleted the column that was causing me trouble, and trimmed the large tables, and it worked.

Thanks for the help

_________________
Old OA Setup: 500 Windows 7 workstations & 200 Apple OSX with OA v1.5.2 on Windows Server 2003 and WAMP 2
New OA Setup: 100 Windows servers with OA 2.2 on Windows Server 2016 and WAMP 3


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group