<?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[Maintenance column in db after upgrade]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">Last week i did an upgrade to version 2.2.10</p>
<p dir="auto">We used to had a daily report through a db query that we check for systems that are in maintenance mode.</p>
<p dir="auto">the query is this one:</p>
<pre><code>USE netxms_db

DECLARE @OBJECT_ID INT, @NAME VARCHAR(63), @ITEM_ID INT, @DESCRIPTION VARCHAR(255)
SET @OBJECT_ID = 0
SET @ITEM_ID = 0

DECLARE @UNMANAGED_SYSTEMS TABLE(
    System VARCHAR(63)
)

WHILE (1 = 1)
BEGIN

    SELECT TOP 1 @OBJECT_ID = object_id
    ,@NAME = name
    FROM netXMS.object_properties
    WHERE object_id &gt; @OBJECT_ID AND maint_mode=1
    ORDER BY object_id

	/* Exit loop if no more entries */
	IF @@ROWCOUNT = 0 BREAK;

	INSERT INTO @UNMANAGED_SYSTEMS SELECT @NAME AS System FROM [netxms_db].[netxms].[items] WHERE node_id = @OBJECT_ID

END

SELECT * FROM @UNMANAGED_SYSTEMS GROUP BY System ORDER BY System ASC
</code></pre>
<p dir="auto">After the upgrade the query is not working. I see some changes in the names but i cannot find a value for the maint_mode.<br />
Have you move it to different table?</p>
<p dir="auto">thanks</p>
]]></description><link>https://forum.netxms.org/topic/5739/maintenance-column-in-db-after-upgrade</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 08:21:01 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/5739.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 15 Nov 2018 13:36:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Maintenance column in db after upgrade on Mon, 19 Nov 2018 15:14:27 GMT]]></title><description><![CDATA[<p dir="auto">When node goes into maintenance mode, event MAINTENANCE_MODE_ENTERED is generated. Unique ID of the resulting event is saved into maint_event_id.</p>
]]></description><link>https://forum.netxms.org/post/25039</link><guid isPermaLink="true">https://forum.netxms.org/post/25039</guid><dc:creator><![CDATA[alk]]></dc:creator><pubDate>Mon, 19 Nov 2018 15:14:27 GMT</pubDate></item><item><title><![CDATA[Reply to Maintenance column in db after upgrade on Thu, 15 Nov 2018 16:49:13 GMT]]></title><description><![CDATA[<p dir="auto">Seems if maint_event_id is greater than 0 the object is in maintenance mode. Looks like they are keeping track of more than a "yes/no" as just entering maintenance mode gives a value of 6335951 and if the object is scheduled for maintenance the value is 6335955.</p>
]]></description><link>https://forum.netxms.org/post/25032</link><guid isPermaLink="true">https://forum.netxms.org/post/25032</guid><dc:creator><![CDATA[gdodd]]></dc:creator><pubDate>Thu, 15 Nov 2018 16:49:13 GMT</pubDate></item></channel></rss>