NetXMS Support Forum

Please login or register.

Login with username, password and session length

Author Topic: Upgrade to 2.0.8  (Read 250 times)

andriusg

  • Newbie
  • *
  • Posts: 7
    • View Profile
Upgrade to 2.0.8
« on: January 05, 2017, 04:01:32 pm »

Hello,
later i have netxms 1.2.17x64 netxms server and today maked upgrade to 2.0.8. On 1.2.17 everything worked.
Atfer upgrade i try to upgrade database and get this error . in logs i see, what driver works fine.

C:\NetXMS\bin>nxdbmgr upgrade
NetXMS Database Manager Version 2.0.8 Build 8078 (2.0.8-RELEASE) (UNICODE)

Upgrading database...
Upgrading from version 345 to 346
Rolling back last stage due to upgrade errors...
Database upgrade failed

How to solve this problem ?
Logged

Alex Kirhenshtein

  • Team Member
  • Administrator
  • Hero Member
  • *****
  • Posts: 856
    • View Profile
Re: Upgrade to 2.0.8
« Reply #1 on: January 05, 2017, 04:37:41 pm »

Please provide more information:

1) database type and version
2) run "nxdbmgr -t upgrade" and post failed queries
Logged

andriusg

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Upgrade to 2.0.8
« Reply #2 on: January 05, 2017, 04:45:36 pm »

1. database type MSSQL server, version 9.00.5069.00.
2. C:\NetXMS\bin>nxdbmgr -t upgrade
NetXMS Database Manager Version 2.0.8 Build 8078 (2.0.8-RELEASE) (UNICODE)

Upgrading database...
Upgrading from version 345 to 346
>>> SELECT name FROM sysobjects WHERE xtype='PK' AND parent_obj=OBJECT_ID('clust
er_sync_subnets')
Rolling back last stage due to upgrade errors...
Database upgrade failed
Logged

Alex Kirhenshtein

  • Team Member
  • Administrator
  • Hero Member
  • *****
  • Posts: 856
    • View Profile
Re: Upgrade to 2.0.8
« Reply #3 on: January 05, 2017, 05:15:26 pm »

I've created ticked for dev team: https://dev.raden.solutions/issues/1389
Logged

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 5670
    • View Profile
Re: Upgrade to 2.0.8
« Reply #4 on: January 05, 2017, 07:16:47 pm »

Hi,

could you please run this query manually (for example in SQL Server Management Studio) and post detailed error message?

Best regards,
Victor
Logged

andriusg

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Upgrade to 2.0.8
« Reply #5 on: January 05, 2017, 07:37:01 pm »

manual query result is in attachment.
 in server i logged as domain administrator . here is my netxms server configuration file
# NetXMS Server configuration file
# Created by NetXMS Server configuration wizard at Thu Jan 05 15:36:26 2017
#

LogFile = C:\NetXMS\New Text Document.txt
DBDriver = mssql.ddr
DBServer = HPDL580
DBName = NetXMSn
DBLogin = *
LogFailedSQLQueries = yes
Logged

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 5670
    • View Profile
Re: Upgrade to 2.0.8
« Reply #6 on: January 05, 2017, 07:43:50 pm »

Please check that cluster_sync_subnets table has primary key. If not, try to create primary key (using columns cluster_id and subnet_addr) and re-run DB migration.

Best regards,
Victor
Logged

andriusg

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Upgrade to 2.0.8
« Reply #7 on: January 06, 2017, 08:47:07 am »

In cluster_sync_subnets table columns cluster_id and subnet_addr doesnt have primary key. I set this items primary key.

I try run nxdbmgr -t upgrade. Here is output
C:\NetXMS\bin>nxdbmgr -t upgrade
NetXMS Database Manager Version 2.0.8 Build 8078 (2.0.8-RELEASE) (UNICODE)

Upgrading database...
Upgrading from version 345 to 346
>>> SELECT name FROM sysobjects WHERE xtype='PK' AND parent_obj=OBJECT_ID('clust
er_sync_subnets')
>>> ALTER TABLE cluster_sync_subnets DROP CONSTRAINT PK_cluster_sync_subnets
>>> SELECT name FROM sysobjects WHERE xtype='PK' AND parent_obj=OBJECT_ID('addre
ss_lists')
Rolling back last stage due to upgrade errors...
Database upgrade failed
Logged

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 5670
    • View Profile
Re: Upgrade to 2.0.8
« Reply #8 on: January 06, 2017, 09:47:21 am »

It seems there is same problem with address_lists table. Try to set PK using columns list_type,community_id,addr_type,addr1,addr2. Also check vpn_connector_networks table - if it doesn't have PK, set it on columns vpn_id,ip_addr.

Best regards,
Victor
Logged

andriusg

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Upgrade to 2.0.8
« Reply #9 on: January 06, 2017, 10:02:46 am »

Thanks for help.
Database upgraded succeful.
Logged