Avatar of Baber Amin
Baber Amin
Flag for Canada asked on

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.
DatabasesMicrosoft SQL Server

Avatar of undefined
Last Comment
Vitor Montalvão

8/22/2022 - Mon
Vitor Montalvão

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.
Baber Amin

ASKER
OK.
So what does that mean to fire a trigger whenever a lock occurs and store that info in a separate database?
ASKER CERTIFIED SOLUTION
Vitor Montalvão

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61