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!

Introducing a Smarter Way to Discover Apps on Splunkbase

We’re excited to announce the launch of a foundational enhancement to Splunkbase: App Tiering. Because we’ve ...

How to Send Splunk Observability Alerts to Webex teams in Minutes

As a Developer Evangelist at Splunk, my team and I are constantly tinkering with technology to explore its ...

.conf25 Registration is OPEN!

Ready. Set. Splunk! Your favorite Splunk user event is back and better than ever. Get ready for more technical ...