Getting Data In

DB Connect SQL Procedures

Kyles
Observer

I've been using dbxquery connection=my_connection procedure=my_procedure to build reports and a few that my DBAs have built require time inputs, one I'm working on expects parameter '@StartDate',  Is there a way to pass that through to the stored proc?

Labels (1)
0 Karma

victor_menezes
Communicator

Hi @Kyles,

What version of DBConnect are you using?
The 3.* versions allow you to pass the field named params with values to be passed to the variables in the query/procedure:

dbxquery connection=<string> [fetchsize=<int>] [maxrows=<int>] [timeout=<int>] [shortnames=<bool>] query=<string> OR procedure=<string> [params=<string1,string2>]

Sample query:

dbxquery procedure="{call sakila.test_procedure(?, ?)}" connection="mysql" params="150,BOB"


 Please try that out if you are running DBConnect 3.x and let me know how it goes

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud’s AI Assistant in Action Series: Analyzing and ...

This is the second post in our Splunk Observability Cloud’s AI Assistant in Action series, in which we look at ...

Elevate Your Organization with Splunk’s Next Platform Evolution

 Thursday, July 10, 2025  |  11AM PDT / 2PM EDT Whether you're managing complex deployments or looking to ...

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...