Chapter 23. Locking DB2 Data

 <  Day Day Up  >  

IN THIS CHAPTER

  • How DB2 Manages Locking

  • Locks Versus Latches

  • Lock Duration

  • Table Space Locks

  • Table Locks

  • Page Locks

  • Row Locks

  • Lock Suspensions, Timeouts, and Deadlocks

  • Partition Independence

  • Lock Avoidance

  • Data Sharing Global Lock Management

  • LOBs and Locking

  • DB2 Locking Guidelines

  • Other DB2 Components

  • The Big Picture

DB2 automatically guarantees the integrity of data by enforcing several locking strategies. These strategies permit multiple users from multiple environments to access and modify data concurrently.

DB2 combines the following strategies to implement an overall locking strategy:

  • Table and table space locking

  • IRLM page and row locking

  • Internal page and row latching

  • Claims and drains to achieve partition independence

  • Checking commit log sequence numbers (CLSN) and PUNC bits to achieve lock avoidance

  • Global locking through the coupling facility in a data sharing environment

What exactly is locking? How does DB2 utilize these strategies to lock pages and guarantee data integrity? Why does DB2 have to lock data before it can process it? What is the difference between a lock and a latch? How can DB2 provide data integrity while operating on separate partitions concurrently? Finally, how can DB2 avoid locks and still guarantee data integrity?

These questions are answered in this chapter. In addition, this chapter provides practical information on lock compatibilities that can aid you in program development and scheduling.

 <  Day Day Up  >  


DB2 Developers Guide
DB2 Developers Guide (5th Edition)
ISBN: 0672326132
EAN: 2147483647
Year: 2004
Pages: 388

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net