Topic: Audit of locks and productivity

There is a need to write down the data on transactions causing locks, and also on transactions demanding many resources.
command DBCC TRACEON (1204), a flag 1204 on locks. I can not understand where will write down the data about locks and as them to derive.
Somebody can prompts a script which kills all transactions dead-lock? I want job to create, which  would kill all at night.


Re: Audit of locks and productivity

Do not confuse lock to deadlocks (deadlocks)
The first - hang while the session which has blocked a resource is active
The second - are automatically resolved by the server (one of sessions-participants is shot) in 5 seconds after origin or much earlier
The flag 1204 writes the information in errorlog a file about the happened deadlocks
https://www.brentozar.com/archive/2014/ … esnt-hard/
https://blogs.msdn.microsoft.com/nav/20 … ss-report/


Re: Audit of locks and productivity

are inevitable and it is normal operation of the server.