Problem using im_odbc (SQLDescribeParam Invalid parameter number)
Hi I'm getting a problem were the im_odbc module connects successfully to the DB via odbc but then straight away disconnects and give the error
INFO [im_odbc|sccm_alerts] im_odbc successfully connected to the databaseWARNING [im_odbc|sccm_alerts] im_odbc detected a disconnection, attempting to reconnect in 10 secondsERROR [im_odbc|sccm_alerts] SQLDescribeParam failed, 07009:2:0:[Microsoft][ODBC Driver 17 for SQL Server]Invalid parameter number (odbc error code: -1)
This is running on windows server 2019 and using MS SQL server 2017 (64bit)
I have tried the ODBC driver 13/17/18 and tried just basic SQL query's to retrieve a single table (of just a couple or rows and columns )
The current DSN again works with PowerShell fine I've tried making my own and using system ones
All permutations work using all ODBC drivers and SQL query's with PowerShell no problem
<Extension _json>
Module xm_json
</Extension>
<Input sccm_alerts>
Module im_odbc
ConnectionString DSN=test;Trusted_Connection=yes;
SQL SELECT ID,TypeID,TypeInstanceID,Name,FeatureArea,
ObjectWmiClass,Severity FROM V_SMS_Alert
</Input>
<Output outfile>
Module om_file
File 'C:\scripts\out.log'
Exec to_json();
</Output>
<Route sccm>
Path sccm_alerts, sccm_alerts => outfile
</Route>
It was al installed as a “standard” SCCM install which is working fine
Many thanks for any help, please let me know if you needs any more information
Kind regards
Hello,
please consider contacting support.
Could you please provide the version of the NXLog package you are running?