Dirty Read: When one transaction is try to read a record , which is the part of half finished transaction.
Lets understands it with example
* A and B are two people working on Employee Table
* B create a huge transaction and update the salary of Employee y to 7000 as a part of transaction.
* In the mean time A select the record of employee y.
* A find the salary of y is 7000.
* Some how transaction of B gets rollback, and salary of y is again set to 2000.
* Now you can see A has wrong salary of Y.
* This this is known as Dirty Read.
Diwakar SharmaPosted Aug 4, 2014, 10:37 AM
Sorry for late reply, if transcation isolation level is read uncommitted , this problem will occur.
Guest UserPosted Aug 1, 2014, 10:20 PM
I wonder how I missed to read this blog. Help me understand, which isolation level was set when you posted this example?
Diwakar SharmaPosted Jul 30, 2014, 9:50 AM
default isolation level in sql server is READ COMMITTED. so user can only read committed data. you can change isolation level by executing following command. SET TRANSCATION ISOLATION LEVEL <ISOLATION TYPE>
Mukesh Kumar TiwariPosted Jul 29, 2014, 6:58 AM
hey how can we avoid this in our project....????
Diwakar SharmaPosted Jul 24, 2014, 11:59 AM
Thanks
Anupam SinghPosted Jul 24, 2014, 6:15 AM
well described ...