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.
Author |
Topic |
tapaswani86
Starting Member
26 Posts |
Posted - 2010-11-25 : 05:05:53
|
Hi all,How we will get deadlock information in production server, how we will resolve the dead lock issue? Please tell me step by step process.ThanksTapaswani |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-11-25 : 05:11:57
|
Have a look at deadlocks in bol==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2010-11-25 : 06:12:08
|
Switch traceflag 1222 on. That will result in a deadlock graph been written to the error log every time a deadlock occurs. Post the result of that graph here.DBCC TRACEON(1222,-1) --Gail ShawSQL Server MVP |
 |
|
NeilG
Aged Yak Warrior
530 Posts |
Posted - 2010-11-25 : 10:24:48
|
Do a trace happen? or use the DMV's to locate problems.I personally use scripts like the below to locate problems.SELECT r.session_id, r.blocking_session_id, s.program_name, s.host_name, t.textFROM sys.dm_exec_requests r INNER JOIN sys.dm_exec_sessions s ON r.session_id = s.session_id CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) tWHERE s.is_user_process = 1 AND r.Session_id != @@Spid |
 |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2010-11-25 : 10:31:27
|
That'll show blocking, but not deadlocks--Gail ShawSQL Server MVP |
 |
|
|
|
|