SQL Server Interview Question #246
What is a dirty read?
Advanced Transactions & Concurrency Senior Advanced
Quick Interview Answer
A dirty read occurs when one transaction reads changes made by another transaction that has not yet committed.
If the modifying transaction later rolls back, the reader has observed data that never became committed database state. READ UNCOMMITTED and NOLOCK can permit dirty reads.
Dirty reads are unacceptable for many financial, inventory, workflow, and transactional operations because decisions may be made from data that subsequently disappears.
Detailed Explanation
A dirty read occurs when one transaction reads changes made by another transaction that has not yet committed.
If the modifying transaction later rolls back, the reader has observed data that never became committed database state. READ UNCOMMITTED and NOLOCK can permit dirty reads.
Dirty reads are unacceptable for many financial, inventory, workflow, and transactional operations because decisions may be made from data that subsequently disappears.