Procedure documentationRestoring Databases Locate this document in the navigation structure

 

After a database failure, for example due to a hardware error, you can restore your database or revert it to an earlier state by importing data backups and log backups from data carriers.

Note that if you need to import a lot of data, restoring the database can take quite a long time. During restoring, the database is not available to users. For information about how to make the database available for users more quickly, see Restoring from a Group of Parallel Data Carriers and Replication and High Availability.

When it starts the restore process, the database system first attempts to import redo log entries still present in the log area. If you want to prevent this and force the deletion of all redo log entries in the log area, initialize the log area before starting to recover your database (this is a part of the restore procedure in Database Studio). More information: Initializing Databases

Prerequisites

Procedure

To restore a database, use Database Studio or Database Manager CLI.

  1. Display the backup history and determine both the last complete and incremental data backup.

    More information:

    Database Studio, Opening the Backup History

  2. Import the last complete data backup.

    Note Note

    If you have initialized the database before the restore process, then overwrite all original database user information (database system administrators and users, but not DBM operators) with the information in the data backup. This is done when the data backup is imported. If you have changed the database user information after creation of the data backup, then these changes are lost when the data backup is imported.

    End of the note.

    If necessary, import the last incremental data backups and log backups as well.

    The backups to be imported must, in their entirety, contain all the contents of the database without any gaps. The database system can only automatically recover the last log entries still in the log area if the log volumes are still intact. If the log volumes still contain all the log entries since the last data backup import, it is enough to restart the database after importing the data backup. The system then imports the content of the log area. If you need to import more log backups after the data backup(s), the database system recognizes the page starting from which the missing content can be imported from the log area. The log backup import terminates at this point, the system recovers the remaining log pages from the log area and automatically transfers the database to the ONLINE operational state.

    It is also possible to restore the database only as far as a certain consistent state before the error occurred.

    More information:

    Database Studio, Restoring Databases

  3. If necessary, recreate any damaged indexes.

    More information:

Example

  1. During normal operation, you back up your database using complete and incremental data backups and log backups.

    This graphic is explained in the accompanying text.

    Database Backup: Complete and Incremental Data Backups and Log Backups (Example)

  2. After a system failure, you recover your database.

    You can choose between different recovery paths.

    This graphic is explained in the accompanying text.

    Database Recovery: Different Recovery Paths (Example)

    Note that after you have restored log backups, you can no longer restore incremental data backups.