Splunk Search

How to cancel |dbxquery sql query?

mlevsh
Builder

Hi,

We are using Splunk DB Connect on search heads to run "|dbxquery" command with SQL queries to Snowflake DB.

Sometimes user , who is  running one of the queries,  realizes,  that a query  would return a  lot of data and cancels  the search by clicking on "Stop" on Splunk GUI, but on Snowflake DB the query is still being executed.

Anybody knows how to Cancel the search initiated via Splunk GUI with |dbxquery command?

 

0 Karma

venkatasri
SplunkTrust
SplunkTrust

Hi @mlevsh 

There was no mention of documents about cancel the query on DB. Splunk DBConnect uses JDBC driver which has cancel operation however it should be supported by both DBMS & driver that you are using it inside DBConnect.  Try timeout= option in dbxquery command to avoid it running for long time.

Refer- java - Stop or terminate long running query in JDBC - Stack Overflow

-----------------------------

An upvote would be appreciated if it helps!

Get Updates on the Splunk Community!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...