db upgrade 1.1.4

Started by lindeamon, September 11, 2011, 07:31:03 PM

Previous topic - Next topic

lindeamon

hi,

how can i import sqlite exported db from version 1.0.12 to sqlite db in version 1.1.4 ?
i have installed version 1.0.12,imported the db and everything worked fine.
i have uninstalled the 1.0.12 and installed version 1.1.4 and tolled it to use the old db with out initializing it and i got errors.
when i tried to upgrade the db through command line it says it had a problem with the syntax in "drop table network_maps drop column background"

what can i do ? i do not want to reconfigure everything again.

10x,
Lindeamon

Victor Kirhenshtein

What is your production DB engine?

lindeamon

i want to use mysql.
what i have done now is installed my old server v 1.0.12 with mysql and import the data.i have managed to upgrade it before to 1.1.3 but not to 1.1.4 and that is what i am tryin to reproduce now so i could maybe export through version 1.1.3 and do the upgrade.

Victor Kirhenshtein

So, you have MySQL database for 1.0.12 and want to upgrade it to 1.1.4? It should be possible to done it in place. Just install 1.1.4, point it to appropriate database, and run database upgrade. If it shows any error, please send me log/screenshot of nxdbmgr upgrade execution.

Best regards,
Victor

lindeamon

ok victor.
does this apply also to any database of chosen ? can i use sqlite if i want ?

thank you very much

lindeamon

do i have to do initialize ?
when do i have to do initialize ?

10x again

Victor Kirhenshtein

You should not initialize database if it already contains data. Initialization is for fresh installation on empty database.

Generally I do not recommend to use SQLite in production. It has both performance and upgrade issues, although performance can be insufficient only for relatively large installations. Upgrade problems are related to the fact that SQLite does not support DROP COLUMN operation - so if database upgrade requires column removal from the table, it will fail. It is possible to do upgrade manually in these cases, but it is time consuming and requires digging into the source code of nxdbmgr to see what SQL queries should be executed.

Best regards,
Victor

lindeamon

ok victor.

i have installed everything from the start.
1. installed the mysql
2. installed version 1.0.12
3. imported the db export i had.

up to here everything worked fine.

4. uninstalled the 1.0.12
5. installed version 1.1.4 and pointed him to the mysql server and did not tell him to initialize.
6. the setup upgraded the db successfully.

the core service does not come up and the eventlog indicates this malfunctions:
1. event id:46, error initializing component locks table
2. event id:43, sql query failed (query = "select var_value from config where var_name=?"):

i have tried to run the services through command line and added the -D 9 at the end for debug mode but got the error: "startservicecontroldispatcher() failed: the service process could not connect to the service controller."

what do you think is wrong ?

10x,
lindeamon

Victor Kirhenshtein

If you run netxmsd.exe from command line, you should omit -d switch, like this:

netxmsd.exe -D 9

Best regards,
Victor

lindeamon

you are right.i have changed the service config and i got the messages i wrote in my last post

i hope you have the answer to the problem.

Victor Kirhenshtein

I have replicated this issue on my system. Looks like a bug in MySQL driver. I'll post a patch when I fix it.

Best regards,
Victor

lindeamon

so what you are saying is that will not be able to use this new vesrion ?
bummer
ok, i will wait for the patch.
b.t.w - i have restored everything to version 1.1.3 and everything is working fine again.

Victor Kirhenshtein

Yes, unfortunately there is a bug in MySQL driver in 1.1.4. I'll try to made a patch tomorrow. Other DB engines should work fine. I do most of the development using Oracle and PostgreSQL, and at some point forgot to make necessary tests at MySQL.

Best regards,
Victor

Marco Incalcaterra

Hi Victor,

I'm getting this error upgrading to version 1.1.4 (from 1.1.3):

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

Upgrading database...
Upgrading from version 236 to 237
SQL query failed ([Microsoft][SQL Native Client][SQL Server]The object 'DF__business___paren__09746778' 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

Now I rolled back to version 1.1.3, any hints?

Another question: where can I find the mobile client for Android?

Thank you very much for your support.

Marco.

Victor Kirhenshtein

Hi!

Same problem as here: https://www.netxms.org/forum/installation/1-1-4-database-upgrade-error/. In short, try to run manually

ALTER TABLE business_services DROP CONSTRAINT DF__business___paren__09746778;

Best regards,
Victor