Home All Groups Group Topic Archive Search About

how to resolve deadlock issues



Author
28 May 2005 2:34 PM
pardhi via SQLMonster.com
Hi

Can anyone help by telling how to resolve deadlocks step-by-step.

I guess atleast some one is good in deadlocks.

Thanks
P

--
Message posted via http://www.sqlmonster.com

Author
28 May 2005 5:02 PM
Hari Prasad
Hi,

I have few instances that deadlock is occuring due to redundant indexes.
Identify the index/object causing the deadlock by enabling the
trace flag 1204. This will enter the details of deadlock in sql server error
log.

How to set tehe trace flag:-

DBCC TRACEON(1204,-1)

There are various other reasons as well for deadlock.

see the below links for more info:-

http://www.devx.com/getHelpOn/10MinuteSolution/16488/1954?pf=true

http://sqlteam.com/forums/topic.asp?TOPIC_ID=49689

http://www.sqlservercentral.com/columnists/skumar/tracingdeadlocks.asp

Thanks
Hari
SQL Server MVP


Show quoteHide quote
"pardhi via SQLMonster.com" <forum@nospam.SQLMonster.com> wrote in message
news:234417d612e643a2a5079db339aa1cfc@SQLMonster.com...
> Hi
>
> Can anyone help by telling how to resolve deadlocks step-by-step.
>
> I guess atleast some one is good in deadlocks.
>
> Thanks
> P
>
> --
> Message posted via http://www.sqlmonster.com
Are all your drivers up to date? click for free checkup

Author
30 May 2005 7:25 AM
reddy via SQLMonster.com
Hi hari

I am new to sql server
I have a question.
1)when can we use trace flags i.e dbcc traceon(1204,3605,-1)?

  after locking occured or before locking.

2) when can we use Sql profiler trace on?
  after locking occured or before locking.

  if we have to use before then it always have to have run 24 hours
traceon then where we will store that trace profile?

--
Message posted via http://www.sqlmonster.com
Author
30 May 2005 11:02 PM
reddy via SQLMonster.com
Thanks Hari.

I just got my answer.
Thanks a lot for sending that link.

--
Message posted via http://www.sqlmonster.com
Author
29 May 2005 6:07 PM
pdxJaxon
1. be sure to always access objects in the same order
2. keep transactions as short as possible
3. never do selects inside of a transaction
4. to help find cause of blocking search for sp_blocker script on google and
use it
5. add nolock hints to selects where you can



Greg Jackson
PDX, Oregon
Author
30 May 2005 7:21 AM
reddy via SQLMonster.com
Thanks Jaxon

--
Message posted via http://www.sqlmonster.com

Bookmark and Share