Monitoring Splunk

Splunk DB Connect 1.1.4: Why am I getting error "java.sql.SQLException: The column "0" is not present in the result set"?

zillionlee
Path Finder

when i use dbx 1.1.4 ,i got an error

2015-05-26 11:44:39.901 dbx9174:ERROR:Scheduler - Error while reloading database input=dbmon-tail://BMS_noteobj/2
com.splunk.config.SplunkConfigurationException: Error validating dbmonTail for monitor=dbmon-tail://BMS_noteobj/2: The column "0" is not present in the result set with query = SELECT id,value,Dtime,No FROM his20150523 
    at com.splunk.dbx.monitor.DatabaseMonitor.validate(DatabaseMonitor.java:165)
    at com.splunk.dbx.monitor.DatabaseMonitor.<init>(DatabaseMonitor.java:145)
    at com.splunk.dbx.monitor.scheduler.Scheduler.loadDatabaseMonitor(Scheduler.java:216)
    at com.splunk.dbx.monitor.scheduler.Scheduler.reloadDatabaseMonitor(Scheduler.java:196)
    at com.splunk.dbx.monitor.DatabaseMonitoringManager$Reloader.run(DatabaseMonitoringManager.java:133)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLException: The column "0" is not present in the result set
    at com.splunk.util.Utils$SQL.getIndexForColumn(Utils.java:1611)
    at com.splunk.dbx.sql.type.impl.AbstractDatabaseType.findRisingColumnIndex(AbstractDatabaseType.java:370)
    at com.splunk.dbx.monitor.impl.TailDatabaseMonitor.performValidation(TailDatabaseMonitor.java:173)
    at com.splunk.dbx.monitor.DatabaseMonitor.validate(DatabaseMonitor.java:159)
    ... 11 more

the table is very simple, (no bigint ,id varchar,value varchar, dtime varchar), the "no" is Rising_Column. when I click the "save" button,it's no error. but when I edit the database-inputs again,the Rising_Column change to "0". It's quite puzzling to me. the database is MS SQLSERVER. Other table-inputs are normal, like (orderno bigint,id varchar value varchar )
so I guess maybe it's because "no" is ms sqlserver ODBC reserved keywords. site: msdn.microsoft.com/en-us/library/ms189822

If I cannot change the column name , how to solve the question?
thanks guys!

0 Karma

jcoates_splunk
Splunk Employee
Splunk Employee

probably a JDBC driver problem... I would open a support ticket. If you want to keep trying on your own, try switching from jTDS to Microsoft driver

0 Karma

zillionlee
Path Finder

Can anyone give me some help?Thanks a lot.

0 Karma
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...