All Apps and Add-ons

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

joao_amorim
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

MuS
Legend

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

sideview
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

somesoni2
Revered Legend

joao_amorim
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

jcoates_splunk
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

joao_amorim
Communicator

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

0 Karma

joao_amorim
Communicator

Thanks @jcoates 🙂

0 Karma

joao_amorim
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

jcoates_splunk
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
Get Updates on the Splunk Community!

What's New in Splunk Enterprise 9.4: Features to Power Your Digital Resilience

Hey Splunky People! We are excited to share the latest updates in Splunk Enterprise 9.4. In this release we ...

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...

SignalFlow: What? Why? How?

What is SignalFlow? Splunk Observability Cloud’s analytics engine, SignalFlow, opens up a world of in-depth ...