<?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[NetXMS 2.2.6 DB Upgrade Fails]]></title><description><![CDATA[<p dir="auto">Trying to upgrade from NetXMS 2.2.3 to 2.2.6, I'm up to the stage where I'm upgrading the database (MariaDB/MySQL) but:</p>
<blockquote>
<p dir="auto">C:\NetXMS\bin&gt;nxdbmgr.exe upgrade<br />
NetXMS Database Manager Version 2.2.6 Build 9513 (2.2.6) (UNICODE)</p>
<p dir="auto">Upgrading database...<br />
Upgrading from version 22.20 to 22.21<br />
SQL query failed (Duplicate column name 'zone_uin'):<br />
ALTER TABLE alarms ADD zone_uin integer<br />
Rolling back last stage due to upgrade errors...<br />
Database upgrade failed</p>
</blockquote>
]]></description><link>https://forum.netxms.org/topic/5601/netxms-2.2.6-db-upgrade-fails</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 19:40:27 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/5601.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 06 Jun 2018 10:11:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to NetXMS 2.2.6 DB Upgrade Fails on Wed, 13 Jun 2018 01:46:06 GMT]]></title><description><![CDATA[<p dir="auto">We're using MariaDB, ALTER TABLE eventually failed, we just cleared the table in the end.<br />
It would be useful if nxdbmgr check [check.cpp CheckDatabase() ?] would do a schema sanity check to see if the database matches the version is claims to be, I don't think it does this?</p>
]]></description><link>https://forum.netxms.org/post/24415</link><guid isPermaLink="true">https://forum.netxms.org/post/24415</guid><dc:creator><![CDATA[Staj]]></dc:creator><pubDate>Wed, 13 Jun 2018 01:46:06 GMT</pubDate></item><item><title><![CDATA[Reply to NetXMS 2.2.6 DB Upgrade Fails on Tue, 12 Jun 2018 05:11:09 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Not sure what database system you are using. Just adding the column to the table did not take any time at all in our case despite the 100+ million rows (we're using Postgres). It was the subsequent updating of the column with actual data that took forever. Probably more of a developer question at this point, as other db systems might behave differently?</p>
<p dir="auto">Cheers</p>
]]></description><link>https://forum.netxms.org/post/24411</link><guid isPermaLink="true">https://forum.netxms.org/post/24411</guid><dc:creator><![CDATA[Tursiops]]></dc:creator><pubDate>Tue, 12 Jun 2018 05:11:09 GMT</pubDate></item><item><title><![CDATA[Reply to NetXMS 2.2.6 DB Upgrade Fails on Tue, 12 Jun 2018 04:40:46 GMT]]></title><description><![CDATA[<p dir="auto">After looking at <em>upgrade_v22.cpp</em> I think I know what happened.<br />
When the installer automatically tried to upgrade the database, it got stuck on <em>ALTER TABLE syslog ADD zone_uin integer</em> which caused the installer to exit abnormally and the subsequent errors from that.<br />
I believe this happened because the <em>syslog</em> table is so large that <em>ALTER TABLE syslog ADD zone_uin integer</em> was taking a long time and the installer didn't like that too much. Is there an installer option to run the install without it doing the database upgrade within the installer? I think we'd prefer to run it manually ourselves in the future.</p>
]]></description><link>https://forum.netxms.org/post/24410</link><guid isPermaLink="true">https://forum.netxms.org/post/24410</guid><dc:creator><![CDATA[Staj]]></dc:creator><pubDate>Tue, 12 Jun 2018 04:40:46 GMT</pubDate></item><item><title><![CDATA[Reply to NetXMS 2.2.6 DB Upgrade Fails on Tue, 12 Jun 2018 03:25:31 GMT]]></title><description><![CDATA[<p dir="auto">Unfortunately it doesn't (continue from where it left off) and the system remains down. Message remains the same on reruns, I'm running <em>nxdbmgr.exe online-upgrade -t <strong>-X</strong></em> now.</p>
]]></description><link>https://forum.netxms.org/post/24409</link><guid isPermaLink="true">https://forum.netxms.org/post/24409</guid><dc:creator><![CDATA[Staj]]></dc:creator><pubDate>Tue, 12 Jun 2018 03:25:31 GMT</pubDate></item><item><title><![CDATA[Reply to NetXMS 2.2.6 DB Upgrade Fails on Fri, 08 Jun 2018 05:19:28 GMT]]></title><description><![CDATA[<p dir="auto">No sure about that one.<br />
After the db upgrade I started our server and triggered the online upgrade. It ran in the background for about three days (we have tables with 100+ million rows), but finished ok.<br />
I am assuming the database connection didn't drop out during the upgrade?<br />
From what I understood, it should be safe to re-run the online-upgrade. It is not altering tables, but populating the new zone_uin fields with the correct data, so should just pick up where it left when it failed.</p>
]]></description><link>https://forum.netxms.org/post/24390</link><guid isPermaLink="true">https://forum.netxms.org/post/24390</guid><dc:creator><![CDATA[Tursiops]]></dc:creator><pubDate>Fri, 08 Jun 2018 05:19:28 GMT</pubDate></item><item><title><![CDATA[Reply to NetXMS 2.2.6 DB Upgrade Fails on Fri, 08 Jun 2018 02:42:23 GMT]]></title><description><![CDATA[<p dir="auto">You were right, I tried again with the -X flag and it finished (more or less) but it says an online-upgrade is still required (which fails)</p>
<blockquote>
<p dir="auto">C:\NetXMS\bin&gt;nxdbmgr.exe online-upgrade -t<br />
NetXMS Database Manager Version 2.2.6 Build 9513 (2.2.6) (UNICODE)</p>
<p dir="auto">&gt;&gt;&gt; SELECT var_value FROM metadata WHERE var_name='PendingOnlineUpgrades'<br />
Running online upgrade procedure for version 22.21<br />
Updating zone UIN in table alarms...<br />
Updating zone UIN in table event_log...<br />
Updating zone UIN in table snmp_trap_log...<br />
Updating zone UIN in table syslog...<br />
Online upgrade procedure for version 22.21 failed<br />
&gt;&gt;&gt; SELECT var_value FROM metadata WHERE var_name='PendingOnlineUpgrades'</p>
<p dir="auto">WARNING: Online upgrades pending. Please run nxdbmgr online-upgrade when possible.</p>
</blockquote>
]]></description><link>https://forum.netxms.org/post/24388</link><guid isPermaLink="true">https://forum.netxms.org/post/24388</guid><dc:creator><![CDATA[Staj]]></dc:creator><pubDate>Fri, 08 Jun 2018 02:42:23 GMT</pubDate></item><item><title><![CDATA[Reply to NetXMS 2.2.6 DB Upgrade Fails on Thu, 07 Jun 2018 12:19:50 GMT]]></title><description><![CDATA[<p dir="auto">That looks like it already tried the upgrade once before. The zone_uin column didn't exist in the alarms table until 2.2.6, so there shouldn't be a duplicate column.<br />
Not sure if it's safe to simply drop that column from the database manually, so the upgrade can re-add it - or if you need to restore your database to a stage prior to the first upgrade.</p>
]]></description><link>https://forum.netxms.org/post/24384</link><guid isPermaLink="true">https://forum.netxms.org/post/24384</guid><dc:creator><![CDATA[Tursiops]]></dc:creator><pubDate>Thu, 07 Jun 2018 12:19:50 GMT</pubDate></item></channel></rss>