All Apps and Add-ons

Splunk Database Connect: How do we use the dbxquery command to find a Stored Procedure (SP) from a specific database?

sochsenbein
Communicator

Hello all,

I just created an SP in one of our databases and on our server. We have hundreds of databases, so I am not sure how to tell Splunk to look specifically for this one (or how else would Splunk know which database to look in?).

If I run the following in Splunk, it says it cannot find the SP:

| dbxquery connection="SERVER_NAME" procedure="{call dbo.GetData}"

I have also tried:

| dbxquery connection="SERVER_NAME" procedure="{call DATABASE.dbo.GetData}"

and

| dbxquery connection="SERVER_NAME" procedure="{call DATABASE..dbo.GetData}"
0 Karma

tkomatsubara_sp
Splunk Employee
Splunk Employee

Hello,
Did you check this web page?
http://docs.splunk.com/Documentation/DBX/3.1.3/DeployDBX/Commands

Also, did you specify the actual serever name to the "connection" parameter? If so, it's completely wrong usage.
Please follow
http://docs.splunk.com/Documentation/DBX/3.1.3/DeployDBX/Createandmanageidentities
http://docs.splunk.com/Documentation/DBX/3.1.3/DeployDBX/Createandmanagedatabaseconnections

0 Karma

sochsenbein
Communicator

@tkomatsubara sorry for the delay, I was on leave. I set up the appropriate identity and connection database. | dbxquery connection="CONNECTION_DATABASE" procedure="{call DATABASE.dbo.GetData}" works on our Stored Procedures that do NOT use temp tables. The SQL is incredibly long and consists of multiple temp tables which is why we went the Stored Procedures route, thinking that it may work. We had first tried the dbxquery="" query"" method which does not allow temp tables either.

0 Karma
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...