Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 28
  • Last Modified:

Table lock escalation time

Database: MS SQL Server

Hi,

Is there a way to know a particular table was locked

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

Thanks.
0
baberamin
Asked:
baberamin
  • 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.
0
 
baberaminAuthor Commented:
OK.
So what does that mean to fire a trigger whenever a lock occurs and store that info in a separate database?
0
 
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.
0

Join & Write a Comment

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

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