Dead lock problem | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Dead lock problem

How can I know when the deadlock occur in SQL Server besides is slowed down or stop running? Anyway to resolve it besides waiting itself to kill the process?
Please give me some instruction. Thanks
Whenever a deadlock occurs, SQL Server automatically senses it and kills one of the processes. Also, its sends an error message to the application, which can be trapped by the application, and used to resubmit the killed process, if desired. Other than this, you don’t have any control over deadlocks (when they occur) in SQL Server. —————————–
Brad M. McGehee, MVP
Webmaster
SQL-Server-Performance.Com
If you want more info about what’s going on in a deadlock, you need to start SQL Server with trace flags -1204 and -1205 (if memory serves – someone who’s at work may be able to correct me here – I’m not!). These cause full information about what deadlocked what and what each process was running at the time to be written into the SQL Server error log, every time one occurs. Tom Pullen
DBA, Oxfam GB
Can you guys give me more information?
How to find it? I know that SQL Server will terminate those thing, however, I need to know what’s being locked. Application can’t tell which table is having dead lock.
Thanks
Well i’m not at work – somone needs to help me here.. you need to start SQL Server with those trace flags. Right click the server in Enterprise Manager.. some where there’s a parameters button, add -T1204 and -T1205. Tom Pullen
DBA, Oxfam GB
Seehttp://www.sql-server-performance.com/deadlocks.asp for more info. —————————–
Brad M. McGehee, MVP
Webmaster
SQL-Server-Performance.Com
]]>