REPAIR

The REPAIR online utility repairs data. The data can be your own data or data that you would not normally access, such as space map pages and index entries.

You use REPAIR to replace invalid data with valid data. Be extremely careful when using REPAIR. Improper use can damage the data even further.

You can use the REPAIR utility to:

  • Test database definitions (DBDs)
  • Repair DBDs
  • Reset a pending status on a table space or index
  • Verify the contents of data areas in table spaces and indexes
  • Replace the contents of data areas in table spaces and indexes
  • Delete a single row from a table space
  • Produce a hexadecimal dump of an area in a table space or index
  • Delete an entire LOB from a LOB table space
  • Dump LOB pages
  • Rebuild object descriptors (OBDs) for a LOB table space
  • Manage version numbers
  • Start of changeTurn on or off Persistent Read Only (PRO) restricted status for table space partitionsEnd of change
  • Update the CURRENT_VERSION or OLDEST_VERSION column of the SYSIBM.SYSTABLESPACE table when the data in the table space is at a different versions from the versions that are recorded in the catalog.

Output

The output from the REPAIR utility can consist of one or more modified pages in the specified DB2® table space or index and a dump of the contents.

Authorization required

To execute this utility, you must use a privilege set that includes one of the following authorities:

  • REPAIR privilege for the database
  • DBADM or DBCTRL authority for the database. If the object on which the utility operates is in an implicitly created database, DBADM authority on the implicitly created database or DSNDB04 is required.
  • Start of changeDATAACCESS authorityEnd of change
  • SYSCTRL or SYSADM authority

An ID with installation SYSOPR authority can also execute REPAIR, but only on a table space in the DSNDB01 or DSNDB06 database.

To execute REPAIR with the DBD option, you must use a privilege set that includes SYSADM, SYSCTRL, or installation SYSOPR authority.

REPAIR should be used only by a person that is knowledgeable in DB2 and your data. Grant REPAIR authorization only to the appropriate people.

Execution phases of REPAIR

The phases for REPAIR are:

Phase
Description
UTILINIT
Performs initialization
REPAIR
Repairs data
UTILTERM
Performs cleanup