Dead locks

Dead locks

Post by Irfa » Fri, 21 Dec 2001 03:50:36



There are frequent dead locks are happening on the site.
what are  the best solutions to avoid dead locks. Can u
please any one
 
 
 

Dead locks

Post by Dinesh T » Fri, 21 Dec 2001 04:05:46


Irfan,

A deadlock happens when one process is holding locks on a resource another
process needs to access and vice versa, neither can proceed so one of them
has to be terminated.  To track these down, you can use a combination of SQL
Profiler traces and DBCC trace flags.  DBCC TRACEON(-1, 1204, 3605) run in
Query Analyzer will write deadlock info to the SQL Server error log (DBCC
TRACEOFF(-1, 1204, 3605) turns it off).  Once you narrow down the statements
involved in the deadlocks, you can look at ways to modify the application to
avoid them.

Much preferred is to use the SQL Profiler and the Deadlock Detection wizard.
Run the trace and log it to a file. Then
view every command that led up to the deadlock, and every command after it.

More info. from
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsen...
ml/veconblockinglocksdeadlocks.asp

Dinesh.


Quote:> There are frequent dead locks are happening on the site.
> what are  the best solutions to avoid dead locks. Can u
> please any one


 
 
 

Dead locks

Post by Narayana Vyas Kondredd » Fri, 21 Dec 2001 15:31:02


Irfan, looks like the system is poorly designed and coded. You need to
understand why deadlocks occur and how to resolve those and how to avoid
those. Please read up the following topics in BOL:

Deadlocking
Mimimizing Deadlocks
Handling Deadlocks
Troubleshooting Deadlocks
Detecting and Ending Deadlocks
--
HTH,
Vyas,
SQL Server FAQ, articles, code samples, Books,

http://vyaskn.tripod.com/


Quote:> There are frequent dead locks are happening on the site.
> what are  the best solutions to avoid dead locks. Can u
> please any one

 
 
 

Dead locks

Post by Simon Che » Fri, 28 Dec 2001 13:09:40


Hello,

MS KB article Q224453's got info in details on troubleshooting deadlock
scenarios.

Q224453 INF: Resolving SQL Server 7.0 or 2000 Blocking Problems
http://support.microsoft.com/support/kb/articles/q224/4/53.asp

---
Simon Cheng
Microsoft SQL Server Support

Disclaimer:
This posting is provided _AS IS_ with no warranties, and confers no rights.

Are you secure?  For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security

--------------------



> Subject: Re: Dead locks
> Date: Wed, 19 Dec 2001 14:05:46 -0500
> Lines: 28
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

> Newsgroups: microsoft.public.sqlserver.server
> NNTP-Posting-Host: 12.125.37.90
> Path: cpmsftngxa09!cpmsftngxa07!tkmsftngxs01!tkmsftngp01!tkmsftngp07
> Xref: cpmsftngxa09 microsoft.public.sqlserver.server:186824
> X-Tomcat-NG: microsoft.public.sqlserver.server

> Irfan,

> A deadlock happens when one process is holding locks on a resource another
> process needs to access and vice versa, neither can proceed so one of them
> has to be terminated.  To track these down, you can use a combination of
SQL
> Profiler traces and DBCC trace flags.  DBCC TRACEON(-1, 1204, 3605) run in
> Query Analyzer will write deadlock info to the SQL Server error log (DBCC
> TRACEOFF(-1, 1204, 3605) turns it off).  Once you narrow down the
statements
> involved in the deadlocks, you can look at ways to modify the application
to
> avoid them.

> Much preferred is to use the SQL Profiler and the Deadlock Detection
wizard.
> Run the trace and log it to a file. Then
> view every command that led up to the deadlock, and every command after
it.

> More info. from

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsen...

- Show quoted text -

> ml/veconblockinglocksdeadlocks.asp

> Dinesh.



> > There are frequent dead locks are happening on the site.
> > what are  the best solutions to avoid dead locks. Can u
> > please any one