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

Who is Participating?
Vitor MontalvãoConnect With a Mentor MSSQL 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.
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?
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.

All Courses

From novice to tech pro — start learning today.