Microsoft SQL Server 2012 Internals
by Bob Beauchemin Kalen Delaney Conor Cunningham, Jonathan Kehayias, Benjamin Nevarez, and Paul S. Randal
Controlling locking
SQL Server usually chooses the correct type of lock and the lock mode. You should override this behavior only if thorough testing has shown that a different approach is preferable. Keep in mind that setting an isolation level affects the locks that held, the conflicts that cause blocking, and the duration of your locks. Your isolation level is in effect for an entire session, and you should choose the one that provides the data consistency required by your application. Use table-level locking hints to change the default locking behavior only when necessary. Disallowing a locking level can adversely affect concurrency.
Lock hints
T-SQL syntax allows you to specify locking hints for individual tables when they are referenced in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access