Splunk Search

Execute stored procedure with parameters using datainputs

suhailquadri
New Member

Hi,

I want to execute stored procedure with parameters but it gives me error like "com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set."

DB input:
exec "StaffDeployment"."dbo"."procedurename" @FROMDATE = '9/14/2017', @TODATE = '9/14/2017 23:59:00', @STEV = '1', @Counter = 5, @FieldPosition = '1,2,3,4'

Please help me in this.

Regards
Suhail

Tags (1)
0 Karma

caseypike
Path Finder

Did you figure this out?

0 Karma

DalJeanis
SplunkTrust
SplunkTrust

I would expect that to be an issue with the stored procedure itself.

In this case, several sites show this happening to different tools and applications, and the answer is usually "Update the stored procedure to SET NOCOUNT ON". Here are a couple of examples...

https://community.jaspersoft.com/wiki/getting-statement-did-not-return-result-set-error-when-using-s...
http://kb.tableau.com/articles/issue/error-stored-procedure-does-not-return-result-set

There is also a more complete and more complicated answer here, but only go there if you are trying to execute a stored procedure that is SUPPOSED to do something more than return a results set.

https://blogs.msdn.microsoft.com/jdbcteam/2008/08/04/sqlserverexception-the-statement-did-not-return...

zeroCalm
New Member

Thank you. I will start on that. I appreciate all of you help on this and other questions up to this point.

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...