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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...