|
View previous topic :: View next topic |
Author |
Message |
kb
Joined: 12 Jan 2021 Posts: 8
|
Posted: Thu Nov 16, 2023 4:58 am Post subject: Problems with SQL Backup log since v10.24 |
|
|
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 |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12811 Location: USA
|
Posted: Thu Nov 16, 2023 5:59 am Post subject: |
|
|
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 |
|
|
kb
Joined: 12 Jan 2021 Posts: 8
|
Posted: Thu Nov 16, 2023 8:21 am Post subject: |
|
|
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 |
|
|
kb
Joined: 12 Jan 2021 Posts: 8
|
Posted: Thu Nov 16, 2023 8:48 am Post subject: |
|
|
It seems the variable %FullPath% ist the culprit. If I replace it with a static value the query works fine. |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12811 Location: USA
|
Posted: Thu Nov 16, 2023 8:48 am Post subject: |
|
|
I think we fixed the problem, please contact support by e-mail and get update
Regards
Alex |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12811 Location: USA
|
Posted: Thu Nov 16, 2023 9:06 am Post subject: |
|
|
PS
I assume you updated to version 14.24, not 10.24? This bug affects only version 14.24
Regards
Alex |
|
Back to top |
|
|
kb
Joined: 12 Jan 2021 Posts: 8
|
Posted: Thu Nov 16, 2023 9:38 am Post subject: |
|
|
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 |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12811 Location: USA
|
Posted: Thu Nov 16, 2023 10:49 am Post subject: |
|
|
You are welcome. No, its not backslash related issue
Regards
Alex |
|
Back to top |
|
|
|
|
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
|