Update from 2.2.11 to 2.2.12 - "nxdbmgr upgrade" fails

Started by StanHubble, January 18, 2019, 12:30:14 AM

Previous topic - Next topic

StanHubble

NetXMS Database Manager Version 2.2.12 Build 9516 (2.2.12) (UNICODE)

Upgrading database...
Upgrading from version 22.41 to 22.42
SQL query failed ([Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot define PRIMARY KEY constraint on nullable
column in table 'address_lists'.):
ALTER TABLE address_lists ADD CONSTRAINT pk_address_lists PRIMARY KEY (list_type,community_id,zone_uin,addr_type,addr1,addr2)
Rolling back last stage due to upgrade errors...
Database upgrade failed


I started from 2.2.10 and got this error on a direct upgrade to 2.2.12 so i reverted back to 2.2.10,
did a ".\nxdbmgr check" --> clean.
upgraded to 2.2.11
then another ".\nxdbmgr check" --> clean.
and tried another upgrade to 2.2.12 with the same error.

The first run through i let the windows installer update the schema but things ended up in the same conditions. subsequent tries I deselected the update schema option, but nxdbmgr upgrade fails with the same condition.

at this point i have reverted back to 2.2.10 , any ideas?

server -> win2012r2
dbserver -> win2012r2 with
Microsoft SQL Server Management Studio      12.0.5207.0
Microsoft Analysis Services Client Tools      12.0.5207.0
Microsoft Data Access Components (MDAC)      6.3.9600.17415
Microsoft MSXML                  3.0 6.0
Microsoft Internet Explorer               9.11.9600.19236
Microsoft .NET Framework               4.0.30319.42000
Operating System                  6.3.9600

Victor Kirhenshtein

Please try to replace nxdbmgr.exe with attached one and run database upgrade again.

Best regards,
Victor

StanHubble

Thanks alot Victor!!
it worked without a hitch.

PS C:\ProgramData\NetXMS\bin> .\nxdbmgr.exe upgrade
NetXMS Database Manager Version 2.2.12 Build 9516 (2.2.12-2-gf93e98c349) (UNICODE)

Upgrading database...
Upgrading from version 22.40 to 22.41
Upgrading from version 22.41 to 22.42
Database upgrade succeeded
PS C:\ProgramData\NetXMS\bin> .\nxdbmgr.exe check
NetXMS Database Manager Version 2.2.12 Build 9516 (2.2.12-2-gf93e98c349) (UNICODE)

Checking database (excluding collected data):
* Zone object properties                                               [PASSED]
* Node object properties                                               [PASSED]
* Node to subnet bindings                                              [PASSED]
* Interface object properties                                          [PASSED]
* Interface bindings                                                   [PASSED]
* Network service object properties                                    [PASSED]
* Network service bindings                                             [PASSED]
* Cluster object properties                                            [PASSED]
* Cluster member nodes                                                 [PASSED]
* Template to node mapping                                             [PASSED]
* Object properties                                                    [PASSED]
* Container membership                                                 [PASSED]
* Event processing policy                                              [PASSED]
* Network map links                                                    [PASSED]
* Data tables                                                          [PASSED]
* Raw DCI values table                                                 [PASSED]
* DCI thresholds                                                       [PASSED]
* Table DCI thresholds                                                 [PASSED]
Database doesn't contain any errors
Database check completed

Junoonguy

Hello Alex / Victor,

Whenever i use upgrade command on, "Database is locked"

C:\NetXMS\bin>.\nxdbmgr.exe upgrade

Upgrading database...
Database is locked

Please help,
Thanks in advance

Victor Kirhenshtein

Hi,

make sure that netxmsd is not running, then run

nxdbmgr unlock

to remove database lock.

Best regards,
Victor

Junoonguy