Running REPAIR
The REPAIR utility is used to resolve data or index inconsistencies manually.
About this task
(Use the CHECK utility to manually resolve referential constraint inconsistencies.) Use the following task after you locate and analyzed the damaged page in a dump and you failed to resolve the problem with the RECOVER utility.
Do not use an SVC dump as the basis for changing data by way of REPAIR. SVC dumps do not always reflect the data as it exists on DASD. Use a dump that is produced by REPAIR, DSN1COPY, or DSN1PRNT instead. Always verify that the page has not changed on DASD by using the VERIFY keyword of REPAIR to verify the log RBA (PGLOGRBA) at offset X'01' of the page header.
Be extremely careful if you are changing the Db2 catalog or directory; refer to Physical Formats and Diagrams for detailed information about the contents and structure of the catalog and directory.
Refer to Syntax and options of the REPAIR control statement for the complete syntax of the REPAIR utility
Procedure
To run REPAIR:
- Invoke the REPAIR utility with the LOG YES option and the
DUMP control statement, specifying the pages that you suspect are
damaged. Then, verify that the dump you received contains the pages that you want.
-
If you know which page is damaged and you can see how to resolve the error, repair the page,
and reset the
broken
bit. Invoke the REPAIR utility with the REPLACE RESET DATA control statement. Keep track of your actions in case anything must beundone
later. - If you determined that the page is not damaged but merely
has the
broken
bit on, reset thebroken
bit. Invoke the REPAIR utility with the REPLACE RESET control statement. - If you cannot determine how to resolve the problem by way of REPAIR or are unable to do so, contact IBM® Support.
Results
If the REPAIR utility was used with the LOG NO option, do not use the RECOVER utility on the data that is modified by REPAIR. Because REPAIR activities are not logged, the RECOVER utility does not recognize the changes that are made with REPAIR. After you successfully use REPAIR (all inconsistencies in the page set are resolved), take an image copy of the data. When the image copy is successfully completed, use the RECOVER utility on the data. This task is because RECOVER uses the new image copy of the data that you modified with REPAIR. If the image copy of the repaired data should become damaged and fallback to a prior image copy occurs, the result of using REPAIR is lost, and the inconsistency reappears.