What are different types of locks in SQL SERVER
What are different transaction levels in SQL SERVER?
Transaction Isolation level decides how is one process isolated from other process.Using
transaction levels you can implement locking in SQL SERVER.
There are four transaction levels in SQL SERVER
The shared lock is held for the duration of the transaction, meaning that no other transactions can change the data at the same time. Other transactions can insert and modify data in the same table, however, as long as it is not locked by the first transaction.
No shared locks and no exclusive locks are honored. This is the least restrictive isolation level resulting in the best concurrency but the least data integrity.
This setting disallows dirty and non-repeatable reads. However, even though the locks are held on read data, new rows can still be inserted in the table, and will subsequently be interpreted by the transaction.
This is the most restrictive setting holding shared locks on the range of data. This setting does not allow the insertion of new rows in the range that is locked; therefore, no phantoms are allowed.
Following is the syntax for setting transaction level in SQL SERVER.
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
2007-10-25, 5485👍, 0💬
What Is the Data Pump Import Utility? - Oracle DBA FAQ - Loading and Exporting Data Oracle Data Pump...
What is NullPointerException and how to handle it? When an object is not initialized, the default va...
Can you have virtual functions in Java? Yes, all functions in Java are virtual by default. This is a...
What is the difference between Session State and ViewState? ViewState is specific to a page in a ses...
How To Define a Sub Function? - Oracle DBA FAQ - Creating Your Own PL/SQL Procedures and Functions A...