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!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...