Had a previous install of 5.2.8 on Windows. Installation of 6.0.0 went smoothly, no issues presented. Upon trying to connect with the new client, found that netxms core service not running. Tried running "nxdbmgr upgrade" but get the following error:
PS C:\NetXMS\bin> .\nxdbmgr upgrade
NetXMS Database Manager Version 6.0.0 Build 6.0-444-gb145606172
Upgrading database...
Upgrading from version 60.7 to 60.8
SQL query failed ([Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The object 'PK__idata__410D428BF41FA2F0' is dependent on column 'idata_timestamp'.):
ALTER TABLE idata ALTER COLUMN idata_timestamp bigint
Rolling back last stage due to upgrade errors...
Database upgrade failed
Sorry, just realized I'm on 5.2.6, not 5.2.8.
I will fix upgrade procedure. In the meantime, you can drop and re-create tables idata and tdata (they should be empty as they normally not used in MS SQL setup, so just to make upgrade procedure work):
DROP TABLE idata;
CREATE TABLE idata
(
item_id integer not null,
idata_timestamp integer not null,
idata_value varchar(255) null,
raw_value varchar(255) null
);
DROP TABLE tdata;
CREATE TABLE tdata
(
item_id integer not null,
tdata_timestamp integer not null,
tdata_value varchar(max) null
);
and then re-run nxdbmgr upgrade.
Hi Victor,
Talked to you yesterday on Telegram and you directed me to this post, I've try this now but it failing to upgrade, see attached, any ideas please?
Thanks.
C:\NetXMS\bin>nxdbmgr check
NetXMS Database Manager Version 6.0.0 Build 6.0-444-gb145606172
Checking database (excluding collected data):
Your database has format version 60.7, this tool is compiled for version 60.30.
Use "upgrade" command to upgrade your database first.
Database check aborted
C:\NetXMS\bin>nxdbmgr upgrade
NetXMS Database Manager Version 6.0.0 Build 6.0-444-gb145606172
Upgrading database...
Upgrading from version 60.7 to 60.8
Converting table idata_100
SQL query failed ([Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Cannot define PRIMARY KEY constraint on nullable column in table 'idata_100'.):
ALTER TABLE idata_100 ADD CONSTRAINT pk_idata_100 PRIMARY KEY (item_id,idata_timestamp)
Converting table tdata_100
SQL query failed ([Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Cannot define PRIMARY KEY constraint on nullable column in table 'tdata_100'.):
....
.....
ALTER TABLE tdata_446 ADD CONSTRAINT pk_tdata_446 PRIMARY KEY (item_id,tdata_timestamp)
Converting table idata_450
SQL query failed ([Microsoft][ODBC Driver 18 for SQL Server][SQL Server]The transaction log for database 'NETXMS' is full due to 'ACTIVE_TRANSACTION' and the holdup lsn is (106450:128624:1).):
UPDATE idata_450 SET idata_timestamp = idata_timestamp * 1000
Rolling back last stage due to upgrade errors...
Database upgrade failed
C:\NetXMS\bin>
Unfortunately I hit the same yesterday as Dreamscape. I tried marking the transaction log as unlimited size growth, but then I ran out of disk space (I have over 100GB free). I copied all the lines I saw and filtered out just the SQL commands and ran them manually, and on "UPDATE idata_1088 SET idata_timestamp = idata_timestamp * 1000" I get an error of "Arithmetic overflow error converting expression to data type int."
Ignoring that last error, running the upgrade command again gives me:
PS C:\netxms\bin> .\nxdbmgr.exe upgrade
NetXMS Database Manager Version 6.0.0 Build 6.0-444-gb145606172
INFO: Server module WEBAPI skipped
Upgrading database...
Upgrading from version 60.7 to 60.8
SQL query failed ([Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The object 'PK__idata__410D428BF41FA2F0' is dependent on column 'idata_timestamp'.):
ALTER TABLE idata ALTER COLUMN idata_timestamp bigint
Rolling back last stage due to upgrade errors...
Database upgrade failed
I'm looking into it. We expect to have patch release 6.0.1 with improved DB upgrade on Monday.
Hello Victor.
Unfortunately, the same problem here.
Best Regards!
Leo
Hello,
I am running into a similar issue on a Ubuntu installation where the database has taken multiple days to upgrade showing that it is converting idata and tdata tables, but never completing.
Thanks in advance!
Just published version 6.0.1 that should address database upgrade issue. Now it does not convert data immediately, but do this in background while server is running, in chunks by 24 hors, so you should gradually get your collected data back, starting from most recent.
It looks good. Thanks a lot and best regards from KTM. ;)
Thanks for the update, I'm still having issues with my one though.....
I restored the db back to the version 5.2.8 before i updated to 6.0.0
I've then run the new version 6.0.1 but the core service will not start, log file says:
2026.02.10 08:47:19.444 *E* [db] Your database has format version 52.23, but server is compiled for version 60.32
If i then try 'nxdbmgr check' i get:
C:\NetXMS\bin>nxdbmgr check
NetXMS Database Manager Version 6.0.1 Build 6.0-469-g5e68d5db1d
Error loading configuration file
Any ideas please?
Quote from: dreamscape on February 10, 2026, 10:55:09 AMC:\NetXMS\bin>nxdbmgr check
NetXMS Database Manager Version 6.0.1 Build 6.0-469-g5e68d5db1d
Error loading configuration file
Make sure you run this in cmd session started with administrator rights - looks like there's access right issue to the server config file.
Message Your database has format version 52.23, but server is compiled for version 60.32 means that nxdbmgr upgraded did not happen (first part of format version is basically netxms version, so 52.23 means that database format is for 5.2.x).
nxdbmgr check will tell that db version is old, so try running nxdbmgr upgrade
Thanks for the quick reply, yes, school boy error, it was admin cmd access.
currently sat at:
2026.02.10 11:35:45.590 *I* [dc.v5migrate ] Migrating recent data from v5 tables (106 idata, 3 tdata)
yes, that's background migration, server reads collected data both from non-migrated and migrated tables, so everything should work even during migration.
Would be interesting to know how long it takes on your system and how big it is (sh st output - number of nodes, dci count, size of the DB)
Finished in about 15 minutes, db is around 8GB, not sure how many nodes
2026.02.10 11:35:45.590 *I* [dc.v5migrate ] Migrating recent data from v5 tables (106 idata, 3 tdata)
2026.02.10 11:50:21.154 *I* [dc.v5migrate ] Recent v5 data migration completed (109 tables migrated)
I can see that the database upgrade is happening in the background, but the netxms-server service won't start.
"Your database has format version 60.7, but server is compiled for version 60.32"
Quote from: twparker on February 10, 2026, 04:52:14 PMI can see that the database upgrade is happening in the background, but the netxms-server service won't start.
"Your database has format version 60.7, but server is compiled for version 60.32"
Are you still in upgrade to 6.0.0, or you've restarted upgrade to 6.0.1?
...happening in the background - is it nxdbmgr background-upgrade running? If so, you need for it to finish and then run nxdbmgr upgrade again - it will upgrade schema further. This step could be a background one in 5.2, but when upgrading to 6.0 we need it to complete prior to subsequent db upgrade steps.
I saw the database upgrade start when I used apt get upgrade. I thought that the server could then be started while that was running, but I suppose not.
Hi,
Did all the updates/upgrades to be on 6.01, rebooted, bus till
NetXMS Database Manager Version 6.0.1 Build 6.0-469-g5e68d5db1d
Upgrading database...
Upgrading from version 60.7 to 60.8
SQL query failed (25P02 ERROR: current transaction is aborted, commands ignored until end of transaction block):
CREATE TABLE tdata_16066 (item_id integer not null,tdata_timestamp bigint not null,tdata_value text null, PRIMARY KEY(item_id,tdata_timestamp))
Rolling back last stage due to upgrade errors...
Database upgrade failed
On Debian 13
PostgreSQL 17.7
Any fixes or workarrounds ?
Thanks
I am receiving similar errors, but I believe I caused my own problems by running the commands that Victor posted earlier.
QuoteDROP TABLE idata;
CREATE TABLE idata
(
item_id integer not null,
idata_timestamp integer not null,
idata_value varchar(255) null,
raw_value varchar(255) null
);
DROP TABLE tdata;
CREATE TABLE tdata
(
item_id integer not null,
tdata_timestamp integer not null,
tdata_value varchar(max) null
);
Is my database irrevocably damaged?
dlauwers, twparker
can you run
nxdbmgr -t upgrade
This is to see what exactly it's doing there
Getting a lot of text - here's a snippet
QuoteDROP TABLE tdata_8505
>>> RELEASE SAVEPOINT nxdbmgr_1771000353984
>>> SELECT var_value FROM metadata WHERE var_name='TDataTableCreationCommand_0'
>>> CREATE TABLE tdata_8505 (item_id integer not null,tdata_timestamp bigint not null,tdata_value text null, PRIMARY KEY(item_id,tdata_timestamp))
>>> SELECT var_value FROM metadata WHERE var_name='TDataTableCreationCommand_1'
>>> SELECT var_value FROM metadata WHERE var_name='TDataTableCreationCommand_2'
>>> SELECT var_value FROM metadata WHERE var_name='TDataTableCreationCommand_3'
>>> SELECT var_value FROM metadata WHERE var_name='TDataTableCreationCommand_4'
>>> SELECT var_value FROM metadata WHERE var_name='TDataTableCreationCommand_5'
>>> SELECT var_value FROM metadata WHERE var_name='TDataTableCreationCommand_6'
>>> SELECT var_value FROM metadata WHERE var_name='TDataTableCreationCommand_7'
>>> SELECT var_value FROM metadata WHERE var_name='TDataTableCreationCommand_8'
>>> SELECT var_value FROM metadata WHERE var_name='TDataTableCreationCommand_9'
>>> SELECT var_value FROM metadata WHERE var_name='TDataIndexCreationCommand_0'
>>> SELECT var_value FROM metadata WHERE var_name='TDataIndexCreationCommand_1'
>>> SELECT var_value FROM metadata WHERE var_name='TDataIndexCreationCommand_2'
>>> SELECT var_value FROM metadata WHERE var_name='TDataIndexCreationCommand_3'
>>> SELECT var_value FROM metadata WHERE var_name='TDataIndexCreationCommand_4'
>>> SELECT var_value FROM metadata WHERE var_name='TDataIndexCreationCommand_5'
>>> SELECT var_value FROM metadata WHERE var_name='TDataIndexCreationCommand_6'
>>> SELECT var_value FROM metadata WHERE var_name='TDataIndexCreationCommand_7'
>>> SELECT var_value FROM metadata WHERE var_name='TDataIndexCreationCommand_8'
>>> SELECT var_value FROM metadata WHERE var_name='TDataIndexCreationCommand_9'
>>> SELECT COUNT(*) FROM idata_74790
This appears more relevant
>>> RELEASE SAVEPOINT nxdbmgr_1771000399839
>>> SELECT var_value FROM metadata WHERE var_name='IDataTableCreationCommand'
>>> CREATE TABLE idata_46970 (item_id integer not null,idata_timestamp bigint not null,idata_value varchar(255) null,raw_value varchar(255) null, PRIMARY KEY(item_id,idata_timestamp))
SQL query failed (25P02 ERROR: current transaction is aborted, commands ignored until end of transaction block):
CREATE TABLE idata_46970 (item_id integer not null,idata_timestamp bigint not null,idata_value varchar(255) null,raw_value varchar(255) null, PRIMARY KEY(item_id,idata_timestamp))
Rolling back last stage due to upgrade errors...
Database upgrade failed
>>> SELECT var_value FROM metadata WHERE var_name='PendingOnlineUpgrades'
There was some query just before CREATE TABLE idata_46970 which failed.
60.7 to 60.8 handles idata/tdata tables, doing this:
1. Check if idata_<id> exists
2. If the table is empty → DROP it
3. If the table is not empty → RENAME it to idata_v5_<id>
4. Create a new idata_<id> table using CreateIDataTable(id)
Pls check, do you have
idata_46970
idata_v5_46970
tables in the DB?
If idata_46970 is there, pls show output of
\d idata_46970
Quote from: Filipp Sudanov on February 13, 2026, 02:29:45 PMdlauwers, twparker
can you run
nxdbmgr -t upgrade
This is to see what exactly it's doing there
Hi, this is the result
It is "working on" Create Table tdata_16066 for about 5 minutes and then it fails
>>> SELECT COUNT(*) FROM idata_16066
>>> SAVEPOINT nxdbmgr_1771234999753
>>> DROP TABLE idata_16066
>>> RELEASE SAVEPOINT nxdbmgr_1771234999753
>>> SELECT var_value FROM metadata WHERE var_name='IDataTableCreationCommand'
>>> CREATE TABLE idata_16066 (item_id integer not null,idata_timestamp bigint not null,idata_value varchar(255) null,raw_value varchar(255) null, PRIMARY KEY(item_id,idata_timestamp))
>>> SELECT var_value FROM metadata WHERE var_name='IDataIndexCreationCommand_0'
>>> SELECT var_value FROM metadata WHERE var_name='IDataIndexCreationCommand_1'
>>> SELECT var_value FROM metadata WHERE var_name='IDataIndexCreationCommand_2'
>>> SELECT var_value FROM metadata WHERE var_name='IDataIndexCreationCommand_3'
>>> SELECT var_value FROM metadata WHERE var_name='IDataIndexCreationCommand_4'
>>> SELECT var_value FROM metadata WHERE var_name='IDataIndexCreationCommand_5'
>>> SELECT var_value FROM metadata WHERE var_name='IDataIndexCreationCommand_6'
>>> SELECT var_value FROM metadata WHERE var_name='IDataIndexCreationCommand_7'
>>> SELECT var_value FROM metadata WHERE var_name='IDataIndexCreationCommand_8'
>>> SELECT var_value FROM metadata WHERE var_name='IDataIndexCreationCommand_9'
>>> SELECT COUNT(*) FROM tdata_16066
>>> SAVEPOINT nxdbmgr_1771234999765
>>> DROP TABLE tdata_16066
>>> RELEASE SAVEPOINT nxdbmgr_1771234999765
>>> SELECT var_value FROM metadata WHERE var_name='TDataTableCreationCommand_0'
>>> CREATE TABLE tdata_16066 (item_id integer not null,tdata_timestamp bigint not null,tdata_value text null, PRIMARY KEY(item_id,tdata_timestamp))
SQL query failed (25P02 ERROR: current transaction is aborted, commands ignored until end of transaction block):
CREATE TABLE tdata_16066 (item_id integer not null,tdata_timestamp bigint not null,tdata_value text null, PRIMARY KEY(item_id,tdata_timestamp))
Rolling back last stage due to upgrade errors...
Database upgrade failed
>>> SELECT var_value FROM metadata WHERE var_name='PendingOnlineUpgrades'
:$
Check Postgres's log - good chance you run out of shared memory
Seems that the table is empty ?
postgres psql -d netxms -c "SELECT * FROM idata_16066 LIMIT 10;"
[sudo] password for xxxxxx:
item_id | idata_timestamp | idata_value | raw_value
---------+-----------------+-------------+-----------
(0 rows)
Quote from: Alex Kirhenshtein on February 16, 2026, 12:27:30 PMCheck Postgres's log - good chance you run out of shared memory
YES !!
I have increased the shared memory, and now no error
sudo nxdbmgr upgrade
NetXMS Database Manager Version 6.0.2 Build 6.0-504-g549db2d3a0
Upgrading database...
Core database schema is up to date
Database upgrade succeeded
I had to increase my shared memory and increase max transaction locks, but I am also back in business. :D
In general I always recommend to start with https://pgtune.leopard.in.ua, when using Postgres