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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

The Data Connection - November 2026

Machine data keeps growing, and every new source brings practical questions: where should it live, how ...

Splunk Auto Ingestion Parallel Pipeline Scaling

Why this feature matters Many Splunk environments experience ingestion pressure long before the host is fully ...

Splunk SecOps on AWS: A New Agentic SecOps Experience

Key takeaways At AWS:reinvent, Splunk, in partnership with Amazon Web Services (AWS), announced Splunk SecOps ...