All Apps and Add-ons

dbxquery using procedure

a212830
Champion

Hi,

I need to run a stored procedure using dbconnect. The stored procedure expects to arguments, an integer, and a Y/N flag. I tried executing the following, but get an "invalid column index" error. I'm running the following:

| dbxquery connection="ERPM" procedure="{call analyticsutil.closebatch(?, ?)}" params="73519178,'Y'"

Anyone run into this before? I read the docs, and this appears to be the proper method for Oracle databases.

0 Karma

kheo_splunk
Splunk Employee
Splunk Employee

According to https://docs.splunk.com/Documentation/DBX/3.1.4/DeployDBX/Commands, first parameter OUT SYS_REFCURSOR for Oracle database procedure.

If you use an Oracle database, you must store the result in the first parameter and set it as OUT SYS_REFCURSOR. See the Oracle Stored procedure example below for details.

If analyticsutil.closebatch does not contain OUT SYS_REFCURSOR as the first parameter, please try to include it.

Simple example can be found for an Oracle procedure call in the following URL that I created some time ago.
https://answers.splunk.com/answers/657219/procedure-in-splunk-dbconnect-31.html

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...