Thursday, March 22, 2012

Deadlock question

I have general question about deadlocks. I get the occasional deadlock when
someone attempts to update a row in the data. I think this might be caused
because the update is happening at the exact same time the row in question
is being updated by a trigger on another table - that I have no control
over.
I'm not sure in general terms how to resolve an issue like this. I'm almost
thinking I should retry the insert immediately if it fails - this is the
only reason it ever fails. But I'm sure mentioning that will get me flamed
so I'm open to ideas from the experts.
Any advice is appreciated.
JasonI can't agree with your reasoning, as it should be possible on a multi-user
system. The following pages from SQL Server 2000 Books Online, should get
you started in the right direction.
Deadlocking
Handling Deadlocks
Minimizing Deadlocks
Detecting and Ending Deadlocks
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Jason MacKenzie" <jmackenzie_nospam@.formet.com> wrote in message
news:uEuOcIeMEHA.3556@.TK2MSFTNGP09.phx.gbl...
I have general question about deadlocks. I get the occasional deadlock when
someone attempts to update a row in the data. I think this might be caused
because the update is happening at the exact same time the row in question
is being updated by a trigger on another table - that I have no control
over.
I'm not sure in general terms how to resolve an issue like this. I'm almost
thinking I should retry the insert immediately if it fails - this is the
only reason it ever fails. But I'm sure mentioning that will get me flamed
so I'm open to ideas from the experts.
Any advice is appreciated.
Jason|||I have no reasoning. But I appreciate your response and will take a look at
those articles.
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:%23nACcUeMEHA.3400@.TK2MSFTNGP09.phx.gbl...
> I can't agree with your reasoning, as it should be possible on a
multi-user
> system. The following pages from SQL Server 2000 Books Online, should get
> you started in the right direction.
> Deadlocking
> Handling Deadlocks
> Minimizing Deadlocks
> Detecting and Ending Deadlocks
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Jason MacKenzie" <jmackenzie_nospam@.formet.com> wrote in message
> news:uEuOcIeMEHA.3556@.TK2MSFTNGP09.phx.gbl...
> I have general question about deadlocks. I get the occasional deadlock
when
> someone attempts to update a row in the data. I think this might be caused
> because the update is happening at the exact same time the row in question
> is being updated by a trigger on another table - that I have no control
> over.
> I'm not sure in general terms how to resolve an issue like this. I'm
almost
> thinking I should retry the insert immediately if it fails - this is the
> only reason it ever fails. But I'm sure mentioning that will get me flamed
> so I'm open to ideas from the experts.
> Any advice is appreciated.
> Jason
>
>

No comments:

Post a Comment