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
*NEW* Splunk Love Promo!
Snag a $25 Visa Gift Card for Giving Your Review!

It's another Splunk Love Special! For a limited time, you can review one of our select Splunk products through Gartner Peer Insights and receive a $25 Visa gift card!

Review:





Or Learn More in Our Blog >>