What is the purpose of locking in DB2?

  • To enforce referential integrity constraints
  • To optimize query performance by caching frequently accessed data
  • To prevent concurrent transactions from accessing the same data
  • To speed up data retrieval by allowing multiple transactions to access it
Locking in DB2 serves the purpose of preventing concurrent transactions from accessing the same data concurrently, ensuring data integrity and consistency. This helps in avoiding situations such as dirty reads and conflicting updates, thereby maintaining the accuracy and reliability of the data. It ensures that only one transaction can modify data at a time, preventing inconsistencies. 
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *