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!

New This Month in Splunk Observability Cloud - Metrics Usage Analytics, Enhanced K8s ...

The latest enhancements across the Splunk Observability portfolio deliver greater flexibility, better data and ...

Alerting Best Practices: How to Create Good Detectors

At their best, detectors and the alerts they trigger notify teams when applications aren’t performing as ...

Discover Powerful New Features in Splunk Cloud Platform: Enhanced Analytics, ...

Hey Splunky people! We are excited to share the latest updates in Splunk Cloud Platform 9.3.2408. In this ...