All Apps and Add-ons

SQL Truncate Query

Gregg123
Engager

Hi Guys,
I'm using Splunk with DB Connector and all seem to work fine. The only problem is that when I go to "Run SQL queries" and click on the DB Query button to execute Truncate statement (I'm connected to Postgres DB) the command doesn't actually do anything and data stays in the table. Selecting and other queries work fine. What seems to be a problem?
When I set up the connection I did select the dialect to be Postgres so such typical for Postgres query should be understood. And, I'm an admin so I do have privileges to delete (truncate) tables.
Any suggestions?
Thanks
Greg

Tags (2)

Gregg123
Engager

Yes, I'm perfectly aware of this fact. If dbconnect is in read only mode such query will cause an error to appear at the top of the browser's window. So, Splunk will actually inform you about this, and states that this is read only connection etc.
I fixed that, and this isn't a problem.
Something else prevents Truncate query to be executed.

0 Karma

yannK
Splunk Employee
Splunk Employee

Are you aware that by default dbconnect only has only read permissions on the database ?
see
http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Addadatabaseconnection

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 ...