Managing Transaction Isolation
To comply with the ACID rules, transactions have to be isolated from each other. This means that data that is used within a transaction has to be separated from other transactions. To accomplish this separation, every transaction locks the data it uses to prevent other transactions from using it. A lock is defined for a locked resource, which can be an index key, a data row, or a table. SQL Server always tries to lock resources as granularly as possible. It starts locking on a row-level basis in most cases, but if too many rows are locked, it can decide to escalate the lock to a table-level basis. This is done automatically. The most common lock resources that exist in SQL Server to lock data are:
RID A row identifier ...
Get Microsoft® SQL Server™ 2005: Applied Techniques Step by Step now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.