What do you mean by dirty read

Showing Answers 1 - 5 of 5 Answers

sivakarthika c

  • Sep 13th, 2005
 

The "dirty read" technique can be used to provide a high degree of concurrent access to VSAM files while avoiding the complications associated with CI and CA splits. The dirty read protocol can be summarized as follows:

  1. The VSAM file must be defined with cross-region SHAREOPTIONS 4.
  2. The file must be allocated with DISP=SHR.
  3. All operations on the file, including reads, must be preceded with an ENQ for the data set. The data set name is specified for the ENQ "rname", but any string can be used for the ENQ "qname" (though it must be the same string for all accessors).
  4. After a lock is obtained, the user's buffer must be refreshed with a GET request. This step also applies to new record insertions.
  5. At the end of all file operations, the enqueue is released with a DEQ function call.
  6. No lock is held during a wait (such as terminal input wait).
  7. Before updating a previously read record, a fresh copy of the record must be obtained and compared to the original to ensure that no other user has updated the record while it was being browsed and modified. As always, the second read, the record comparison, and the update must be shielded by a lock.

  Was this answer useful?  Yes

victor

  • Sep 26th, 2005
 

Where are we using Dirty read

  Was this answer useful?  Yes

vijay jessy

  • Nov 6th, 2012
 

pls anybody explain clearly. we dont need the definition from ibms manual.

  Was this answer useful?  Yes

Srivi

  • May 19th, 2013
 

Quite often in database processing, we come across the situation wherein one transaction can change a value, and a second transaction can read this value before the original change has been committed or rolled back. This is known as a dirty read scenario because there is always the possibility that the first transaction may rollback the change, resulting in the second transaction having read an invalid value.

While you can easily command a database to disallow dirty reads, this usually degrades the performance of your application due to the increased locking overhead. Disallowing dirty reads also leads to decreased system concurrency.

  Was this answer useful?  Yes

srinivas

  • Sep 24th, 2014
 

Actually Dirty read is an another name for Uncommitted Read.Generally we use this in cobol-db2 program.
When a user from one end is updating a table another user from other end can read the same table and he wil be accessing the updates done by the user1 even before committing. Thats why we call as Uncommitted read/Dirty read.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions