What are different isolation levels in SQL Server?

Isolation level in SQL Server are as follows :
  1. Read Uncommitted - Lowest level of isolation . Uncommitted data can be read . Hence we will have Dirty Read , Nonrepeatable read and Phantom record. Shared and exclusive locks are not honoured .
  2. Read Committed - This is SQL's default isolation level . Uncommitted data cannot be read. It allows inserts and deletes. Shared locks are held hence dirty read is avoided but we still have Nonrepeatable read and Phantom record
  3. Repeatable Read - It prevents data updation . Locks are placed on the data , preventing other users from updating the data. Prevents non-repeatable reads but phantom rows are still possible.
  4. Serializable - Highest level of isolation . Prevents other users from updating or inserting rows into the dataset until the transaction is complete . We don't have Dirty Read , Nonrepeatable read and Phantom record

No comments:

Popular Posts