0 What are Isolation levels? (SQL)

An isolation level determines the degree to which data is isolated for use by one process and
guarded against interference from other processes.

Read Committed - SQL Server acquires a share lock while reading a row into a cursor but frees the lock immediately after reading the row. Because a shared lock request is blocked by an exclusive lock, a cursor is prevented from reading a row that another task has updated but not yet committed. Read committed is the default isolation level setting for both SQL Server and ODBC.

Read Uncommitted - SQL Server requests no locks while reading a row into a cursor and honors no exclusive locks. Cursors can be populated with values that have already been updated but not yet committed. The user is bypassing all of SQL Server’s locking transaction control mechanisms.

Repeatable Read or Serializable - SQL Server requests a shared lock on each row as it
is read into the cursor as in READ COMMITTED, but if the cursor is opened within a transaction, the shared locks are held until the end of the transaction instead of being freed after the row is read. This has the same effect as specifying HOLDLOCK on a SELECT statement.

0 comments:

 

Dot Net - Pros & Cons Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates