04.24.08
Transaction Isolation level
Few important things about isolation level
Read uncommitted
When its used, SQL Server not issue shared locks while reading data. So, you can read an uncommitted transaction that might get rolled back later. This isolation level is also called dirty read. This is the lowest isolation level. It ensures only that a physically corrupt data will not be read.
Read committed
This is the default isolation level in SQL Server. When its used, SQL Server will
use shared locks while reading data. It ensures that a physically corrupt data will notbe read and will never read data that another application has changed and not yet committed,but it does not ensure that the data will not be changed before the end of the transaction.
Repeatable read
When its used, the dirty reads and nonrepeatable reads cannot occur.
It means that locks will be placed on all data that is used in a query,
and another transactions cannot update the data.
Nonrepeatable read
When a transaction reads the same row more than one time, and between the
two (or more) reads, a separate transaction modifies that row. Because the
row was modified between reads within the same transaction, each read
produces different values, which introduces inconsistency.