Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Acivities on Database

Author  Topic 

dbalearner
Constraint Violating Yak Guru

272 Posts

Posted - 2010-05-16 : 22:27:58
We have experienced a sudden lockout in the activity monitor of SSMS and found around 30 PIDs were suspended and the reason for that there were several transactions were deadlocked. SO I have released some of the most earlier PID's being killed and thereafter those transactions were in Queue were released their locks and written back to database of their transactions.

However,I do have several questions as without killing those PIDs (Which I have done earlier) how to get it release the deadlock situation?

I have used dm_tran_database_transactions, but What is the DMV to find out the Transactions caused to deadlock?

Apart from Activity Monitor, Is it possible to get first hand information like from Alert!!!

In General, how to keep track of Database activity in such situations.

Can anyone guide this.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-05-16 : 23:27:42
You can log the deadlocks to the Error Log using trace flag 1222. You can also log them in a profiler trace.

What isolation level are you using? If it's the default, then you should really consider switching to READ_COMMITTED_SNAPSHOT as it'll eliminate deadlocks between reads and writes.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

dbalearner
Constraint Violating Yak Guru

272 Posts

Posted - 2010-05-17 : 20:10:57
Thanks for that I have set it up.

But I have to investigate by using the DMV as to what happening from the last 24 Hours either any user accessing any session OR generated a report and causing the CPU busy and also Memory allocations tight.

This will help in long standing issues, as Otherday I used with dm_tran_database_transactions but of no use.

Thanks again.
Go to Top of Page
   

- Advertisement -