NetXMS Support Forum

English Support => General Support => Topic started by: Marco Incalcaterra on April 10, 2015, 07:31:17 PM

Title: Error upgrading from NetXMS 2.0-M2 to M3 (error in upgrading MSSQL DB
Post by: Marco Incalcaterra on April 10, 2015, 07:31:17 PM
I got an error during the upgrade process, I forced manually the upgrade of the DB through the nxdbmgr tool to see all the errors:

C:\Program Files\NetXMS\bin>nxdbmgr.exe upgrade -X
NetXMS Database Manager Version 2.0-M3 Build 8012

Upgrading database...
Upgrading from version 345 to 346
SQL query failed ([Microsoft][SQL Server Native Client 11.0][SQL Server]The object 'PK__cluster_sync_sub__173876EA' is dependent on column 'subnet_addr'.):
ALTER TABLE cluster_sync_subnets ALTER COLUMN subnet_addr varchar(48)
SQL query failed ([Microsoft][SQL Server Native Client 11.0][SQL Server]The object 'PK__vpn_connector_ne__22AA2996' is dependent on column 'ip_addr'.):
ALTER TABLE vpn_connector_networks ALTER COLUMN ip_addr varchar(48)
SQL query failed ([Microsoft][SQL Server Native Client 11.0][SQL Server]The object 'PK__address_lists__04E4BC85' is dependent on column 'addr1'.):
ALTER TABLE address_lists ALTER COLUMN addr1 varchar(48)
SQL query failed ([Microsoft][SQL Server Native Client 11.0][SQL Server]The object 'PK__address_lists__04E4BC85' is dependent on column 'addr2'.):
ALTER TABLE address_lists ALTER COLUMN addr2 varchar(48)
Upgrading from version 346 to 347
Upgrading from version 347 to 348
Upgrading from version 348 to 349
Upgrading from version 349 to 350
SQL query failed ([Microsoft][SQL Server Native Client 11.0][SQL Server]The data types text and varchar are incompatible in the not equal to operator.):
UPDATE object_properties SET comments = comments + char(13) + char(10) + (SELECT description FROM ap_common WHERE ap_common.id = object_properties.object_id) WHERE EXISTS (SELECT description FROM ap_common WHERE ap_common.id = object_properties.object_id AND description IS NOT NULL AND description <> '')
Upgrading from version 350 to 351
Database upgrade succeeded


I reverted to version M2. Any hints?

Engine is SQL Server 2012 (v. 11.0.5058) on a Windows Server 2012 R2

Best regards,
Marco

Title: Re: Error upgrading from NetXMS 2.0-M2 to M3 (error in upgrading MSSQL DB
Post by: Victor Kirhenshtein on April 13, 2015, 10:10:42 AM
Hi,

seems that I have to fix upgrade procedure for MS SQL. I'll try to reproduce it later today and make a fix for database manager.

Best regards,
Victor
Title: Re: Error upgrading from NetXMS 2.0-M2 to M3 (error in upgrading MSSQL DB
Post by: maredcz on April 21, 2015, 04:28:43 PM
Have the same issue ...

Martin
Title: Re: Error upgrading from NetXMS 2.0-M2 to M3 (error in upgrading MSSQL DB
Post by: Victor Kirhenshtein on April 30, 2015, 10:14:26 AM
Hi,

should be fixed in 2.0-M4.

Best regards,
Victor