Reorganizing databases

While you reorganize a database (using the database reorganization utilities), you must protect it from changes by IMS systems that are authorized to use it, unless you are using HALDB Online Reorganization (OLR).

You have three ways to protect the database:

  • Issue the /DBRECOVERY DB GLOBAL or UPDATE DB STOP(ACCESS) command to close the database on all IMS systems. After the database reorganization is complete, tell the MTO of each IMS system that the database is available.
  • Issue the DBRC CHANGE.DB NOAUTH command to specify that the database is not authorized to participate in data sharing. After the reorganization is complete, issue the CHANGE.DB AUTH command to resume data sharing.
  • Devise an MTO procedure to coordinate application activities in sharing IMS systems. This procedure would direct the MTOs to stop applications that might be active and using the database. After the reorganization is complete, the MTOs can restart applications in the appropriate online IMS systems.

The reorganization utilities communicate with DBRC. In response, DBRC does not allow further processing for the database, even after the reorganization, until you make an image copy of the database or recovery group.

The reorganization utilities might not execute if they fail to obtain authorization from DBRC for the database. DBRC denies authorization if it has authorized another IMS system to update the database (which is why you need to issue the /DBRECOVERY DB, UPDATE DB STOP(ACCESS), or CHANGE.DB commands first). If you receive message DFS044I saying that DBRC is required for the execution of the utility, and the utility abends, wait for the IMS system to terminate or, if it is an online IMS, issue a /DBRECOVERY DB or UPDATE DB STOP(ACCESS) command.

Related reading:  For a sample operational scenario dealing with database recovery in a database-level sharing environment, see Reorganizing a database.