Recovering from Db2 catalog or directory I/O errors

When the Db2 catalog or directory fails because of I/O errors, you need to recover from this situation so that processing can return to normal.

Symptoms

The following message is issued, where dddddddd is the name of the table space from the catalog or directory that failed (for example, SYSIBM.SYSCOPY):

DSNU086I DSNUCDA1 READ I/O ERRORS ON SPACE=dddddddd.
         DATA SET NUMBER=NNN.
         I/O ERROR PAGE RANGE=aaaaaa, bbbbbb

This message can indicate either read or write errors. You might also receive a DSNB224I or DSNB225I message, which indicates an input or output error for the catalog or directory.

Environment

Db2 remains active.

If the Db2 directory or any catalog table is damaged, only user IDs with the RECOVERDB privilege in DSNDB06, or an authority that includes that privilege, can perform the recovery. Furthermore, until the recovery takes place, only those IDs can do anything with the subsystem. If an ID without proper authorization attempts to recover the catalog or directory, message DSNU060I is displayed. If the authorization tables are unavailable, message DSNT500I is displayed to indicate that the resource is unavailable.

Resolving the problem

Operator response: Recover each table space in the failing Db2 catalog or directory. If multiple table spaces need to be recovered, recover them in the recommended order as defined in the information about the RECOVER utility.
  1. Stop the failing table spaces.
  2. Determine the name of the data set that failed by using one of the following methods:
    • Check prefix.SDSNSAMP (DSNTIJIN), which contains the JCL for installing Db2. Find the fully qualified name of the data set that failed by searching for the name of the table space that failed (the one that is identified in the message as SPACE=dddddddd).
    • Construct the data set name by performing one of the following actions:
      • If the table space is in the Db2 catalog, the data set name format is:
        DSNC111.DSNDBC.DSNDB06.dddddddd.I0001.A001

        The dddddddd is the name of the table space that failed.

      • If the table space is in the Db2 directory, the data set name format is:
        DSNC111.DSNDBC.DSNDB01.dddddddd.I0001.A001

        The dddddddd is the name of the table space that failed.

      If you do not use the default (IBM®-supplied) formats, the formats for data set names might be different.

  3. Use the access method services DELETE command to delete the data set, specifying the fully qualified data set name.
  4. After the data set is deleted, use the access method services DEFINE command with the REUSE parameter to redefine the same data set, again specifying the same fully qualified data set name. Use the JCL for installing Db2 to determine the appropriate parameters.
  5. Issue the command START DATABASE ACCESS(UT), naming the table space that is involved.
  6. Use the RECOVER utility to recover the table space that failed.
  7. Issue the command START DATABASE, specifying the table space name and RO or RW access, whichever is appropriate.