DarenHan's Blog
I am a Dot net asp.net developer working with VS 2005 and SQL 2005 now.
Sign in
|
Join
|
Help
Home
About
RSS for Posts
Atom
RSS for Comments
Email Notifications
Go
Search
Go
Community
Home
Blogs
Media
Forums
Wikis
Groups
Archives
January 2009 (1)
December 2008 (5)
November 2008 (1)
October 2008 (4)
September 2008 (5)
August 2008 (2)
July 2008 (5)
June 2008 (7)
May 2008 (7)
April 2008 (3)
March 2008 (8)
February 2008 (7)
January 2008 (1)
December 2007 (8)
November 2007 (8)
October 2007 (7)
September 2007 (2)
August 2007 (3)
July 2007 (2)
June 2007 (5)
May 2007 (5)
April 2007 (4)
March 2007 (1)
February 2007 (4)
January 2007 (5)
December 2006 (5)
November 2006 (3)
October 2006 (3)
August 2006 (5)
July 2006 (3)
June 2006 (3)
May 2006 (6)
April 2006 (9)
March 2006 (7)
Deadlocks in SQL Server 2000 and how to prevent them.
I did some research on deadlocks and how to prevent deadlocks. Below are the ways where we can detect, log and eliminate deadlocks.
1. Elimation Method: we can use deadlock priority configuration
put SET DEADLOCK_PRIORITY LOW and SET LOCK_TIMEOUT in those long running sql queries, these will be "victims" in a deadlock, then these will be
sacrificed
in times of deadlock.
as describe in
http://www.mssqltips.com/tip.asp?tip=1210
and
http://msdn2.microsoft.com/en-us/library/aa213032(SQL.80).aspx
2. Detecting Deadlocks: see SQL Server 2000 - Locking Related Objects in
http://www.mssqltips.com/tip.asp?tip=1359
Using sql profiler to trace deadlogs
http://www.mssqltips.com/tip.asp?tip=1036
3.
Logging Deadlocks: we can use XML or the graph method.
Capture deadlock information in XML
and graphs
http://www.mssqltips.com/tip.asp?tip=1234
Published Wednesday, December 12, 2007 12:31 PM by
darenhan