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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...