<?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[SQL query failed mariadb.]]></title><description><![CDATA[<p dir="auto">Dear Technical support,<br />
i get two SQL query failed events in my netxmsd instance, it happens again and again</p>
<p dir="auto">Instance is debian 10 and database mariadb, and netxms 3.5.136-1 version.</p>
<p dir="auto">I set up debug mode and catch as much as i can, looks like there is special char in value which cause query to fail.<br />
mariadb database for netxms is Charset latin1 and collation name latin1_swedish_ci</p>
<pre><code>2020.10.16 11:14:05.968 *D* [db.query           ] BEGIN TRANSACTION successful (level 1)
2020.10.16 11:14:05.997 *D* [                   ] Node(MTFlaje.poh.cz)-&gt;getMetricFromSNMP(.1.3.6.1.2.1.31.1.1.1.11.11): dwResult=0
2020.10.16 11:14:05.997 *D* [                   ] DataCollector(): processing DC object 368423 ".1.3.6.1.2.1.31.1.1.1.11.120" owner=183 sourceNode=0
2020.10.16 11:14:06.015 *E* [db.drv             ] SQL query failed (Query = "INSERT INTO hardware_inventory (node_id,category,component_index,hw_type,vendor,model,location,capacity,part_number,seri
al_number,description) VALUES (?,?,?,?,?,?,?,?,?,?,?)"): Incorrect string value: '\xC5\xA5 Eth...' for column `netxms`.`hardware_inventory`.`hw_type` at row 1
2020.10.16 11:14:06.015 *D* [                   ] NetObj::expandText(sourceObject=108 template='Database query failed (Query: %1; Error: %2)' alarm=0 event=102620065)
2020.10.16 11:14:06.015 *D* [event.corr         ] CorrelateEvent: event SYS_DB_QUERY_FAILED id 102620065 source netxms [108]
</code></pre>
<pre><code>] EVENT SYS_DB_QUERY_FAILED [52] at {0} (ID:102620065 F:0x0001 S:4 TAGS:"") FROM netxms: Database query failed (Query: INSERT INTO hardware_inventory
 (node_id,category,component_index,hw_type,vendor,model,location,capacity,part_number,serial_number,description) VALUES (?,?,?,?,?,?,?,?,?,?,?); Error: Incorrect string value: '\xC5\xA5 Eth...' for
 column `netxms`.`hardware_inventory`.`hw_type` at row 1)
</code></pre>
<p dir="auto">Looks like unescaped value to insert.</p>
]]></description><link>https://forum.netxms.org/topic/6727/sql-query-failed-mariadb.</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 11:41:14 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/6727.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Oct 2020 09:27:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to SQL query failed mariadb. on Sat, 17 Oct 2020 19:07:33 GMT]]></title><description><![CDATA[<p dir="auto">Ajajaj have this db since version 2, so i try migrate data o my local and see how that works, our db has now 60gb.</p>
<p dir="auto">Thank you for information.</p>
]]></description><link>https://forum.netxms.org/post/28724</link><guid isPermaLink="true">https://forum.netxms.org/post/28724</guid><dc:creator><![CDATA[madmucho]]></dc:creator><pubDate>Sat, 17 Oct 2020 19:07:33 GMT</pubDate></item><item><title><![CDATA[Reply to SQL query failed mariadb. on Fri, 16 Oct 2020 12:20:49 GMT]]></title><description><![CDATA[<p dir="auto">NetXMS expects that database is created with UTF-8 charset, which should happend by default in current version of mariadb. I've just tried on my Debian 10, database got created with utf8mb4.</p>
<p dir="auto">Try creating the database like this:<br />
CREATE DATABASE mydatabase CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;</p>
<p dir="auto">If you have some data in you database, you can try migrating it to the newly created DB with nxdbmgr.</p>
]]></description><link>https://forum.netxms.org/post/28721</link><guid isPermaLink="true">https://forum.netxms.org/post/28721</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Fri, 16 Oct 2020 12:20:49 GMT</pubDate></item></channel></rss>