<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Upgrade database from 2.21 to 2.22 error]]></title><description><![CDATA[<p dir="auto">I was trying to upgrade to the newest version, and when upgrading the database, I get an error ...</p>
<p dir="auto">C:\NetXMS\bin&gt;nxdbmgr upgrade -t<br />
NetXMS Database Manager Version 0.2.22</p>
<p dir="auto">Configuration file OK<br />
Upgrading database...<br />
Upgrading from version 80 to 81<br />
&gt;&gt;&gt; SELECT item_id,schedule FROM dci_schedules<br />
&gt;&gt;&gt; DELETE FROM dci_schedules<br />
&gt;&gt;&gt; ALTER TABLE dci_schedules ADD schedule_id integer not null<br />
SQL query failed (General SQL Server error: Check messages from the SQL Server.)<br />
:<br />
ALTER TABLE dci_schedules ADD schedule_id integer not null<br />
Rolling back last stage due to upgrade errors...<br />
Database upgrade failed</p>
<p dir="auto">When trying to execute the same command from Query analyzer, I get this error back :</p>
<p dir="auto">ALTER TABLE only allows columns to be added that can contain nulls or have a DEFAULT definition specified. Column 'schedule_id' cannot be added to table 'dci_schedules' because it does not allow nulls and does not specify a DEFAULT definition.</p>
<p dir="auto">I need ideas ...</p>
]]></description><link>https://forum.netxms.org/topic/463/upgrade-database-from-2.21-to-2.22-error</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 18:22:53 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/463.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 04 Sep 2008 20:38:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Upgrade database from 2.21 to 2.22 error on Wed, 17 Sep 2008 12:55:47 GMT]]></title><description><![CDATA[<p dir="auto">Hello!</p>
<p dir="auto">It's not a plain SQL script. Commands may vary between databases, so it's a set of static and dynamically created SQL queries encoded into nxdbmgr code.</p>
<p dir="auto">I change the upgrade code to re-create tables instead of adding constraints, hopefully it will work.</p>
<p dir="auto">Attached is a latest version of nxdbmgr.exe.</p>
<p dir="auto">Best regards,<br />
Victor</p>
<hr />
<p dir="auto"><a href="/assets/uploads/files/smf/0000000000182-nxdbmgr.exe">nxdbmgr.exe</a></p>
]]></description><link>https://forum.netxms.org/post/2335</link><guid isPermaLink="true">https://forum.netxms.org/post/2335</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 17 Sep 2008 12:55:47 GMT</pubDate></item><item><title><![CDATA[Reply to Upgrade database from 2.21 to 2.22 error on Fri, 12 Sep 2008 21:41:35 GMT]]></title><description><![CDATA[<p dir="auto">I tryed again and used the executable that you provided me, and got an error again ... on another step ...</p>
<p dir="auto">C:\NetXMS\bin&gt;nxdbmgr upgrade -t<br />
NetXMS Database Manager Version 0.2.23-rc1</p>
<p dir="auto">Configuration file OK<br />
Upgrading database...<br />
Upgrading from version 80 to 81<br />
&gt;&gt;&gt; SELECT item_id,schedule FROM dci_schedules<br />
&gt;&gt;&gt; DROP TABLE dci_schedules<br />
&gt;&gt;&gt; CREATE TABLE dci_schedules (schedule_id integer not null,item_id integer not<br />
 null,schedule varchar(255) not null,PRIMARY KEY(item_id,schedule_id))<br />
&gt;&gt;&gt; ALTER TABLE address_lists ADD PRIMARY KEY (list_type,community_id,addr_type,<br />
addr1,addr2)<br />
SQL query failed (General SQL Server error: Check messages from the SQL Server.)<br />
:<br />
ALTER TABLE address_lists ADD PRIMARY KEY (list_type,community_id,addr_type,addr<br />
1,addr2)<br />
Rolling back last stage due to upgrade errors...<br />
Database upgrade failed</p>
<p dir="auto">When executing the command from query analyzer, the error is bellow .</p>
<p dir="auto">Server: Msg 8111, Level 16, State 1, Line 1<br />
Cannot define PRIMARY KEY constraint on nullable column in table 'address_lists'.<br />
Server: Msg 1750, Level 16, State 1, Line 1<br />
Could not create constraint. See previous errors.</p>
<p dir="auto">Can you give me the full upgrade script that you´re using on this executable ?<br />
I can try to work on it .. , as seems that I´m the only one having problems to upgrade ...</p>
]]></description><link>https://forum.netxms.org/post/2330</link><guid isPermaLink="true">https://forum.netxms.org/post/2330</guid><dc:creator><![CDATA[hadesfromhell]]></dc:creator><pubDate>Fri, 12 Sep 2008 21:41:35 GMT</pubDate></item><item><title><![CDATA[Reply to Upgrade database from 2.21 to 2.22 error on Fri, 05 Sep 2008 15:26:30 GMT]]></title><description><![CDATA[<p dir="auto">Looks like a bug in handling MS SQL on upgrade (it works fine on my test system, but I have MS SQL 2005). Try to do an upgrade with attached nxdbmgr.exe.</p>
<p dir="auto">Best regards,<br />
Victor</p>
<hr />
<p dir="auto"><a href="/assets/uploads/files/smf/0000000000174-nxdbmgr.exe">nxdbmgr.exe</a></p>
]]></description><link>https://forum.netxms.org/post/2314</link><guid isPermaLink="true">https://forum.netxms.org/post/2314</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 05 Sep 2008 15:26:30 GMT</pubDate></item></channel></rss>