Al's BrainDump
Navigation
¶
Main Page
Random Page
Create a new Page
All Pages
Categories
Administration
File Management
Login/Logout
Language Selection
Your Profile
Create Account
Quick Search
»
Advanced Search »
Discuss (0)
View Page Code
History
Locking
Print
RSS
Modified on 2011/12/21 16:52
by
Administrator
Categorized as
Uncategorized
(10)
»
Inheritance
»
Integration Services
»
Locking
[X]
»
French
»
Futures
»
Glossary
»
Greeks
»
Learning Schedule
»
INFORMATION_SCHEMA Views
»
Indexes
»
Inheritance
»
Integration Services
»
Locking
Deadlocks
¶
Resolve by
Change code to trap SQL Server 1205 errors and resubmit the request. A 1205 error means the request was chosen as a deadlock victim, and a try/catch can resubmit without the user ever being aware of it.
After you enable the 1204 and 1222 trace flags and determine which indexes are getting deadlocked, you can often eliminate deadlocks by adding an index, changing an index, or every once in a while by deleting an index
Turn off parallel operations. If parallel operations are possible (the server has multiple processors/cores) and allowed, it's possible that turning it off (by setting MaxDOP to 1) will reduce or eliminate deadlocking
Enable page-level and row-level locking. Page and row locking are allowed by default, but if someone's turned them off, you might need to consider turning them back on
Locks
¶
http://www.mssqlcity.com/Articles/General/sql2000_locking.htm
Shared (S)
Update (U)
Exclusive (X)
Intent
intent shared (IS)
intent exclusive (IX)
shared with intent exclusive (SIX)
intent update (IU)
update intent exclusive (UIX)
shared intent update (SIU)
Schema
schema modification (Sch-M)
schema stability (Sch-S)
Bulk Update (BU)
Key-Range
Shared Key-Range and Shared Resource lock (RangeS_S)
Shared Key-Range and Update Resource lock (RangeS_U)
Insert Key-Range and Null Resource lock (RangeI_N)
Exclusive Key-Range and Exclusive Resource lock (RangeX_X)
Conversion Locks (RangeI_S, RangeI_U, RangeI_X, RangeX_S, RangeX
ScrewTurn Wiki
version 3.0.5.600. Some of the icons created by
FamFamFam
.