Serializable Read Isolation

Serializable Read mode is similar to repeatable reads but adds to it the restriction that rows cannot be added to a result set that was read previously within a transaction. This prevents phantom reads. In other words, Serializable Read locks the existing data being read as well as rows that do not yet exist. It accomplishes this by locking the data being read as well as locking across the range of values being read so that additional rows cannot be added to the range.

For example, say you run a query in a transaction that retrieves all records from the Sales.SalesOrderHeader table in the AdventureWorks2012 database for a Customer with the CustomerID of 11300. To prevent additional records from being added to the ...

Get Microsoft SQL Server 2014 Unleashed 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.