SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Deadlock issues


Deadlock issues

Author
Message
OnlyOneRJ
OnlyOneRJ
Old Hand
Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)

Group: General Forum Members
Points: 348 Visits: 690
Getting Deadlock issues on regular basis..where Select insert or select update is involved in SP

Can UPDLOCK & HOLDLOCK solve the issue in select query??
or else suggest something you have comeacross

************************************
Every Dog has a Tail !!!!! :-D
RandomEvent
RandomEvent
Say Hey Kid
Say Hey Kid (682 reputation)Say Hey Kid (682 reputation)Say Hey Kid (682 reputation)Say Hey Kid (682 reputation)Say Hey Kid (682 reputation)Say Hey Kid (682 reputation)Say Hey Kid (682 reputation)Say Hey Kid (682 reputation)

Group: General Forum Members
Points: 682 Visits: 417
Have you tried optimising the queries to improve performance, and what Isolation level are you using as this can have a dramatic impact if your for example trying to report off a table using Serializable Isolation.
OnlyOneRJ
OnlyOneRJ
Old Hand
Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)

Group: General Forum Members
Points: 348 Visits: 690
That i am not sure.. coz the developers need help & so they asked us whether we can provide the solution to them..
They have optimized the query .. still deadlock comes..

When i see the Stored procedure i saw that Select form Table 1 & next query is Update to Table 1....
& many users are using & executing the same sp for fetching the report & many users are updating the records..

************************************
Every Dog has a Tail !!!!! :-D
MarkusB
MarkusB
SSCertifiable
SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)

Group: General Forum Members
Points: 5881 Visits: 4208
Using locking hints should only be done as a last resort.

Optimizing the query and indexes should come first. Also using READ_COMMITTED_SNAPSHOT isolation level can help.

This article may help you on the way http://www.sqlservercentral.com/articles/deadlock/65614/

Markus Bohse
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search