Recovering the Database Using the DB2 MultiNode Command Line Interface

You can recover the database by reapplying the log files containing transactions that are not part of any database backup image. The roll-forward capability is applied after a database or table space image is restored.

Before reapplying the logs (roll-forward) on the restored database, you must enable the logarchmeth1 database configuration parameter to perform the log archiving.

Whenever the log files are restored with the roll-forward capability, DB2 MultiNode searches for the following target restore paths:

  • DB2 MultiNode's own directory path for log file restores.

  • The retrieve path that was specified during the installation of the DB2 MultiNode agent.

  • The archive path that was specified during the installation of the DB2 MultiNode agent.

  • The path identified (if any) in the Overflow Directory field within the roll-forward. For more information about the overflow directory, go to overflowflowpath - Overflow log path configuration parameter on the IBM DB2 documentation website.

If the system is unable to find any of these paths, the appropriate error is reported in a file within the DB2 Audit Error Path that was specified during installation of the DB2 MultiNode agent. After recovering the database, you will not be able to reapply the logs.

Procedure

  1. Export the catalog node for database recovery using the following command:

    export DB2NODE=0
    db2 terminate
  2. Do any of the following:

    • To recover a database to a point in time, run the following command:

      db2 recover db database_name to 2022-01-25-13.35.29
    • To recover a database to the end of the logs, run the following command:

      db2 recover db database_name to end of logs

Note

You can recover a database only on the catalog node.

Page contents

×

Loading...