![]() NOLOCK: Do not issue shared locks and do not honor exclusive locks.HOLDLOCK: Hold a shared lock until completion of the transaction instead of releasing the lock as soon as the required table, row, or data page is no longer required.This can happen if timeouts are not handled properly.Įrland Sommarskog, SQL Server MVP, following kind of locks are available in SQL Server which you can apply with SELECT, INSERT, UPDATE, and DELETE statements: It's worth noting that the if the application has a different transaction going on, you could experience blocking with this transaction if you try to run your own transaction.īut do you know that you always get a serializable transaction? There may be a bug in the application so that it sometimes leaves transactions orphaned. An alternative is to a SET TRANSACTION ISOLATION LEVEL READ COMMITTED.Įnlist=false is more of an experiment to prove the theory. If this is the normal way? It's not a very normal situation in the first place. Or more exactly pooling with connctions that have a different connection string. You are correct, this would prevent connection pooling. is this a normal way people to solve this kind of problem? will this impact the performance, i heard about that the ADO.NET will cache the connection object in a pool, will this 'enlist = false' break the rule? Else you would have to add DBCC USEROPTIONS and the output into a table to look at later.Ģ. You might be able to see differences in Profiler. How did you conclude that the level was serializable in the first place? ![]() is there any quick way to know the result(like the level lower down to 2) rather than keep waiting the deadlock happend again?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |