1.1.4 database upgrade error

Started by DanG, September 12, 2011, 03:13:56 PM

Previous topic - Next topic

DanG

Hello,

When trying to upgrade using MS SQL Express 2008 R2 I receive an error with the native SQL driver being newer than the to be installed.
Since I'm using ODBC (as the native driver did not work inn 1.1.3)  this error is strange.
I then uninstalled NetXMS 1.1.3. Installed a clean 1.1.4 and followed the wizard to reconfigure all settings. I selected the same ODBC config.
Installation wend without any error.
Since the core service was not started I continued with the database upgrade, however I get receive the following error:


C:\Program Files\NetXMS\bin>nxdbmgr upgrade
NetXMS Database Manager Version 1.1.4

Upgrading database...
Upgrading from version 236 to 237
SQL query failed ([Microsoft][SQL Server Native Client 10.0][SQL Server]The obje
ct 'DF__business___paren__4B0D20AB' is dependent on column 'parent_id'.):
ALTER TABLE business_services DROP COLUMN parent_id
Rolling back last stage due to upgrade errors...
Database upgrade failed

I guess there's a foreigner key problem.

What should I do?

Thanks,

Dan

Victor Kirhenshtein

Please execute manually the following query:

ALTER TABLE business_services DROP CONSTRAINT DF__business___paren__4B0D20AB;

and then run upgrade again.

Best regards,
Victor

DanG

running the alter tabel returns the following error:
Msg 4902, Level 16, State 1, Line 2
Cannot find the object "business_services" because it does not exist or you do not have permissions.

It souldn't be premission as I'm logged in as sa.

Tried deleting using the SQL Server Management Studio, however I get the same:
The Defualt "DF_business..." does not exist.

Any Idea?

Dan

Victor Kirhenshtein

Try to login with same user as NetXMS server or use fully qualified name, most likely something like dbo.DF__business___paren__4B0D20AB or netxms.DF__business___paren__4B0D20AB. You should see fully qualified table names in management studio under <database>/tables.

Best regards,
Victor

DanG

I used fully qualified name, but that didn't work. Loging under the NetXMS user did it.

Upgrading the database then gave following error:
Upgrading database...
Upgrading from version 236 to 237
SQL query failed ([Microsoft][SQL Server Native Client 10.0][SQL Server]The obje
ct 'DF__business___statu__4C0144E4' is dependent on column 'status'.):
ALTER TABLE business_services DROP COLUMN status
Rolling back last stage due to upgrade errors...

Which i removed with :
ALTER TABLE business_services DROP CONSTRAINT DF__business___statu__4C0144E4;


After that database upgrade when on to success:

Upgrading database...
Upgrading from version 236 to 237
Upgrading from version 237 to 238
Upgrading from version 238 to 239
Upgrading from version 239 to 240
Database upgrade succeeded

I can now start the core service.

Thanks Victor.

I guess this sould be corrected in the install  procedure?

Dan

Victor Kirhenshtein

Yes, of course it will be corrected. Looks like 1.1.4 is one of the worst releases for the project history :( I'll do a 1.1.5 release this week with the fixes.
Btw, in 1.1.4 we have replaced old mssql.ddr with new one, which uses SQL Server Native Client, so it should work on modern Windows versions with SQL Server 2005 and up.

Best regards,
Victor

DanG

This makes upgrading such a fun I guess  ;D
Once 1.1.5 is out I'll try using the native sql driver.

Thanks again.

Dan

DanG

Victor,

Maybe another minor upgrade issue: the NetXMs Management Console shows 1.1.3 in the help/about dialog.

Dan

Marco Incalcaterra

I had to add also:

ALTER TABLE netxms.business_services DROP CONSTRAINT DF__business___paren__09746778;

Now it works fine.

Thanks to all.

Marco.

PS BTW where can I find the mobile client for Android?

Victor Kirhenshtein

Hi!

Sorry for delay. I have published apk file for Android client on web site.

Best regards,
Victor

Marco Incalcaterra

Quote from: Victor Kirhenshtein on September 15, 2011, 11:50:46 AM
Sorry for delay. I have published apk file for Android client on web site.

Thanks a lot for your efforts! I'm currently on 1.1.3, I guess I have to upgrade to 1.1.4 before using it.

Victor Kirhenshtein

Yes, there was changes in communication protocol, so you need server 1.1.4. And I recommend to wait for 1.1.5 due to all recently discovered upgrade problems.

Best regards,
Victor

Marco Incalcaterra

Quote from: Victor Kirhenshtein on September 15, 2011, 06:12:27 PM
Yes, there was changes in communication protocol, so you need server 1.1.4. And I recommend to wait for 1.1.5 due to all recently discovered upgrade problems.

Ok, I'll wait, thank you very much.


Marco