KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

Problems with SQL Backup log since v10.24

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
kb



Joined: 12 Jan 2021
Posts: 8

PostPosted: Thu Nov 16, 2023 4:58 am    Post subject: Problems with SQL Backup log since v10.24 Reply with quote

Since updating to v10.24 the backup logging to MSSQL does not work anymore.
The SQL is unchanged and testing the ODBC data source on the HostMon host is fine.
Testing the Data source in HostMon via Options works fine as well.

The logging itself does not work and throws multiple errors in syslog.
Here are some german examples, shortened and anonymized:

Backup log error. ODBC error code: 4294967295 ([Microsoft][ODBC SQL Server Driver][SQL Server]In der INSERT-Anweisung sind mehr Spalten angegeben als Werte in der VALUES-Klausel. Die Anzahl von Werten in der VALUES-Klausel und die Anzahl von in der INSERT-Anweisung angegebenen Spalten müssen übereinstimmen)

Backup log error. ODBC error code: 4294967295 ([Microsoft][ODBC SQL Server Driver][SQL Server]Falsche Syntax in der Nähe von 'Root'
[Microsoft][ODBC SQL Server Driver][SQL Server]Kein schließendes Anführungszeichen nach der Zeichenfolge ',',LEFT(',499),LEFT(',7999),LEFT(',19),LEFT(',299))')

Thanks in advance
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12793
Location: USA

PostPosted: Thu Nov 16, 2023 5:59 am    Post subject: Reply with quote

We cannot reproduce the problem. What ODBC driver do you use?
Could you send hostmon.ini and .HML file with tests to support (by e-mail)?

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
kb



Joined: 12 Jan 2021
Posts: 8

PostPosted: Thu Nov 16, 2023 8:21 am    Post subject: Reply with quote

The ODBC driver is Microsoft built-in SQL Server driver version 10.00.17763.4974 from 12.10.2023, but that's most likely not the culprit.

The hostmon.ini has the following odbcLogSQLQuery:
Insert into hmlog (eventtime,eventtimestamp,testname,status,statusid,simplestatus,reply,testid,testmethod,testmethodid,testcomment1,testcomment2,testcreatedate,testmodifydate,interval,alertthreshold,hostaddr,folder,fullpath,acknowledgedat,acknowledgedby,ackcomment,httppage,httpcode,httpheader) VALUES ('%DateTime%',getDate(),'%TestName%','%Status%',LEFT('%StatusID%',2),'%SimpleStatus%',LEFT('%Reply%',7999),'%TestID%','%TestMethod%',LEFT('%MethodID%',2),'%CommentLine1%','%CommentLine2%','%CreatedTime%','%ModifiedTime%','%Interval%','%AlertThreshold%','%HostAddr%','%Folder%','%FullPath%','%AcknowledgedAt% ','%AcknowledgedBy%',LEFT('%AckComment%',499),LEFT('%HttpPage%',7999),LEFT('%HttpCode%',19),LEFT('%HttpHeader%',299))

This query worked for years and it did in v10.20 until 8:30 am. I even restored the hostmon.ini from pre-update to make sure the query was exactly the same. The database and the table were not changed and the problem started directly with the upgrade.

For testing purposes I checked the original query from a fresh install / hostmon.ini, created an appropriate table and tested with that query:

Insert into hmlog (eventtime, testname, status, reply, testid, testmethod) VALUES ('%DateTime%', '%TestName%', '%Status%', '%Reply%', %TestID%, '%TestMethod%')

That works flawlessly.
Back to top
View user's profile Send private message
kb



Joined: 12 Jan 2021
Posts: 8

PostPosted: Thu Nov 16, 2023 8:48 am    Post subject: Reply with quote

It seems the variable %FullPath% ist the culprit. If I replace it with a static value the query works fine.
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12793
Location: USA

PostPosted: Thu Nov 16, 2023 8:48 am    Post subject: Reply with quote

I think we fixed the problem, please contact support by e-mail and get update

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 12793
Location: USA

PostPosted: Thu Nov 16, 2023 9:06 am    Post subject: Reply with quote

PS
I assume you updated to version 14.24, not 10.24? This bug affects only version 14.24

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
kb



Joined: 12 Jan 2021
Posts: 8

PostPosted: Thu Nov 16, 2023 9:38 am    Post subject: Reply with quote

Thanks for the quick fix, SQL logging is working again. In fact it partially worked before, it just threw lots of errors and dropped some entries. I assume it had to do with the double backslashes in the full path, or?

And yes, I used 14.24.

Sorry for that typo and once again thanks for the fast help.
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12793
Location: USA

PostPosted: Thu Nov 16, 2023 10:49 am    Post subject: Reply with quote

You are welcome. No, its not backslash related issue

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index