All Apps and Add-ons

Can you help me with the following error in Splunk DB Connect: "com.micron.sqlserver.jdbc.SQLServerException: The statement did not return a result set."

sochsenbein
Communicator

Hello all, when creating a Stored Procedure in MSSQL and creating a new Input in Splunk DB Connect 3, I notice that if the SP contains a temporary table at all, it returns the following error:

com.micron.sqlserver.jdbc.SQLServerException: The statement did not return a result set.

Curious if anyone else has experienced this error and found a fix, and if all they needed to do was install a JDBC driver?

Tags (1)
0 Karma
1 Solution

sochsenbein
Communicator

I figured out the problem. In order for temp tables to work in Splunk, you have to add "SET NOCOUNT ON" at the beginning of the procedure and set the Fetch Size in Splunk Web to 0 (unlimited). When creating the Data Input, it would not save, I had to write it manually through the CLI and restart the Deployer. It is now working.

View solution in original post

brianmueller
Engager

Thank you @sochsenbein.  I added  "SET NOCOUNT ON" to the beginning and it fixed my query.

 

 

0 Karma

sochsenbein
Communicator

I figured out the problem. In order for temp tables to work in Splunk, you have to add "SET NOCOUNT ON" at the beginning of the procedure and set the Fetch Size in Splunk Web to 0 (unlimited). When creating the Data Input, it would not save, I had to write it manually through the CLI and restart the Deployer. It is now working.

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!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

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