All Apps and Add-ons

Splunk DB Connect: Why does table get locked for output

ankurborah
Path Finder

I am using Splunk DB connect app for SqlServer DB. The connection is working fine.
I am able to feed search result to DB table e.g xyz. I have a scheduler that executes every 2 minutes.
Now the problem is xyz table locked frequently and this table is accessed by another front-end application.

Is it possible that while Splunk is writing into DB table it gets locked for that duration or any other reason for table locking?

0 Karma

amitm05
Builder

@ankurborah
I believe this is not to be handeled by Splunk but rather by your SQL query statements itself. Because splunk isn't doing anything about locking your table.
Suggestions -
Do you require such high frequency of querying your table for writing. See if you can reduce the cron for this.
Use Transactions in your Sql qyery to avoid lockouts. An example - https://blog.cloudboost.io/how-to-use-transaction-in-sql-server-aaaaa23e491a

Hope this helps. Let me know.
Thanks

0 Karma

ankurborah
Path Finder

Thanks for reply. I am using Splunk DB Connect > Data Lab > Outputs to write Splunk query results to DB table. We have DB team they mentioned that table is get locked after we develop the splunk solution to write into DB. Application that accessing the DB table is using get methods(read only) so they need the table should be unlock status always.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...