All Apps and Add-ons

Splunk DB Connect 2: How to run Stored Procedures as DB Inputs?

Communicator

Hi guys,

I want to know how to run Stored Procedures as DB Inputs in DB Connect 2.

I have some SP's running as DB Inputs in DB Connect 1 and they work great. Also, those SP's receive as a parameter the rising column like this:

EXEC [user].[sp_records_monitor] @LAST_UPDATE = {{ ? }}

But now I'm migrating from DB Connect 1 to DB Connect 2 and I'm getting errors when I define those SP's as a DB Input and also passing the rising column to the SP.
Already tried to run the SP outside, in the search, using the dbxquery, but didn't work either.

Can anyone tell me the exact syntax to run the query now with the SP and also how to pass the value of the rising column to a DB Input?

Best regards,
João Amorim

Tags (1)
0 Karma

SplunkTrust
SplunkTrust

Hi joao_amorim,

quick update: as of now, this is possible with DB connect v3 http://docs.splunk.com/Documentation/DBX/3.0.2/DeployDBX/Commands#procedure

cheers, MuS

SplunkTrust
SplunkTrust

Supported as of v3 for dbxquery which is great, but still not supported as dbinputs, it seems, which was the question

0 Karma

Revered Legend

Communicator

Yeah but at DB Connect v1 I have two DB Inputs that run SP's like i said so probably at DB 1 is already supported.

Thanks for the fast reply

0 Karma

Splunk Employee
Splunk Employee

It is not supported in DB Connect 1, you just got lucky that it worked. Maybe try disabling query wrapping on the connection?

0 Karma

Communicator

@jcoates how do you disable query wrapping on connection??

0 Karma

Splunk Employee
Splunk Employee
0 Karma

Communicator

Thanks @jcoates 🙂

0 Karma

Communicator

Lucky?? This is working for like an year....

And i tried to run more SP's of that database at DB Con v1 and all of them worked, so i believe that's not luck at all...

Disabling query wrapping on the connection at DB Con v2?? Or v1??

0 Karma

Splunk Employee
Splunk Employee

I believe that we didn't test, plan for, or support SPs in DB Connect version 1 or 2.

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!