The Read Uncommitted Isolation level permits you to read uncommitted data.
The transaction is completed or not it doesn’t matter because It has never issued the share locks and it allows other transactions to modify data that you are reading.
Anytime you can read your data without any locking issues, but sometimes it generates unexpected results because the data returned by the SELECT are kind of dirty data or in a half state only.
Below is a small demonstration to read uncommitted data.
Now test this READ UNCOMMITTED isolation level:
First, create a table with sample data:
CREATE TABLE tbl_Employee
INSERT INTO tbl_Employee
Open a new query window or session and executing this script:
UPDATE tbl_Employee SET EmpName ='Jenny' WHERE EmpID=1
WAITFOR DELAY '00:00:15'
During this 15 second delay, Open a new query window or session and try to SELECT this table under READ UNCOMMITED isolation level:
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
SELECT *FROM tbl_Employee
Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.
If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.
I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.