Error upgrading from NetXMS 2.0-M2 to M3 (error in upgrading MSSQL DB

Started by Marco Incalcaterra, April 10, 2015, 07:31:17 PM

Previous topic - Next topic

Marco Incalcaterra

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


Victor Kirhenshtein

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


Victor Kirhenshtein