11.5. DB2 Locking
DB2 uses various levels of locking to provide concurrent data access and at the same time protect the data. Depending on the operations requested, the database manager can acquire locks on databases, buffer pools, table spaces, tables, table blocks, and table rows. Locks are acquired implicitly by DB2 according to the semantics defined by the isolation level.
11.5.1. Lock Attributes
During normal data manipulation processing, DB2 uses row-level locking by default. You can override this rule to acquire table-level locking instead. The ALTER TABLE statement with the LOCKSIZE option forces DB2 to place a table lock whenever the table is accessed. The statement will look like this:
ALTER TABLE employee LOCKSIZE TABLE
This setting ...
Get Understanding DB2®: Learning Visually with Examples now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.