All Apps and Add-ons
Highlighted

dbxquery using procedure

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
Highlighted

Re: dbxquery using procedure

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