Knowledge Management

Splunk SQL query

rahul2gupta
Path Finder

Hi @gcusello ,

Is it possible to run a SQL query from Splunk search bar to a SQL server? i.e. I want to run a SQL query against server abc1sql07.

Is this possible ? if so, what permission do we need to setup on SQL server to ensure Splunk has permission to query the database?

Regards,

Rahul

0 Karma

anilchaithu
Builder

@rahul2gupta 

It is possible to query database from Splunk.

  • You need read permissions to the database.
  • You need to install splunk app for dbconnect on splunk

The syntax to run this query is

 

| dbxquery connection="connection_name" query="select ...."

 

 

Hope this helps

0 Karma
Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...