Table lock escalation time

baberamin
baberamin used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Vitor MontalvãoIT Engineer
Distinguished Expert 2017

Commented:
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.

Author

Commented:
OK.
So what does that mean to fire a trigger whenever a lock occurs and store that info in a separate database?
IT Engineer
Distinguished Expert 2017
Commented:
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.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial