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!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...