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 Registration is OPEN!

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

Detecting Cross-Channel Fraud with Splunk

This article is the final installment in our three-part series exploring fraud detection techniques using ...

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...