Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Avoiding deadlock
Message
From
12/10/2014 16:10:14
 
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01609189
Message ID:
01609197
Views:
35
>Generally speaking, yes. It's a good idea to wrap these attempts into some type of "try-catch", and maybe some retry loop.
>
>You might already know about this- it's a good idea also to view the entries in SYS.DM_TRAN_LOCKS. That's more for troubleshooting but it tells you any process ID that has a lock (shared or write) on any tables.
>
>While I'm not a fan of WITH (NOLOCK) if the initial query has ZERO risk of bringing back incomplete/uncommitted data, you could theoretically issue a WITH (NOLOCK) on the SELECT, and that would avoid instances of an UPDATE causing an issue. But again, you need to think carefully about that one.

All my select commands all have the NOLOCK statement. Are you saying that with the NOLOCK statement that I should not have those issues? I remember this was the reason I implemented it. Before, I had this situation much more.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform