How DB2 uses Locks to control Concurrency

Three different causes for concurrency in DB2.

  1. Lost updates- Two procesess A and B Accessing same row. A is updated the row, and then B also updates the same row. So A ‘s updates are lost.
  2. Accessing data which is not committed
  3. Unrepeatable read- without concurrency causes you to get different data each time you read.

    Because of all the above reasons DB2 apply Locks on all resources, to avoid Accessing data before even committing.

    Advertisements

    Author: Srini

    Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.