• Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 40
  • Last Modified:

Table lock escalation time

Database: MS SQL Server


Is there a way to know a particular table was locked

1. How many times
2. On which date and time

  • 2
1 Solution
Vitor MontalvãoMSSQL Senior EngineerCommented:
No, there's no history of locks.
The only way I can see doing that is to create your own solution by running a 24h audit system and store that information in a database so you can analyze it after.
baberaminAuthor Commented:
So what does that mean to fire a trigger whenever a lock occurs and store that info in a separate database?
Vitor MontalvãoMSSQL Senior EngineerCommented:
No. There are no triggers for locks.
Only thing that can trace triggers are SQL Server Extend Events. You'll need to create your solution using the Locks Event Category.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now