Improved catalog availability

Db2 12 improves the availability of Db2 catalog objects on which CATMAINT and online REORG run.

Begin program-specific programming interface information.

When a transaction issues dynamic SQL statements, the Db2 database manager dynamically prepares the SQL statements for execution. During preparation of SQL statements, the database manager acquires read claims on several catalog table spaces and related indexes, and acquires a DBD lock on the catalog. The DBD lock is needed to serialize catalog operations with CATMAINT and other DDL that may execute against the catalog, because CATMAINT might be making structural changes to the catalog.

In previous releases of Db2, the transaction released the DBD lock and the read claims at commit points. If transactions with dynamic SQL statements did not issue commit operations for a long time, CATMAINT and online REORG on the catalog were blocked during that long period.

In Db2 12, the Db2 database manager releases DBD locks on the catalog and read claims against catalog objects as soon as PREPARE statement execution is complete. This change improves availability for CATMAINT and online REORG on catalog objects.

End program-specific programming interface information.