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!

Leveraging Detections from the Splunk Threat Research Team & Cisco Talos

  Now On Demand  Stay ahead of today’s evolving threats with the combined power of the Splunk Threat Research ...

New in Splunk Observability Cloud: Automated Archiving for Unused Metrics

Automated Archival is a new capability within Metrics Management; which is a robust usage & cost optimization ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...