DB2 Version 9.7 for Linux, UNIX, and Windows

Using restore

Use the RESTORE DATABASE command to recover a database or table space after a problem such as media or storage failure, or application failure. If you have backed up your database, or individual table spaces, you can recreate them if they have become damaged or corrupted in some way.

About this task

The database can be local or remote.

The following restrictions apply to the restore utility:

Before you begin

When restoring to an existing database, you should not be connected to the database that is to be restored: the restore utility automatically establishes a connection to the specified database, and this connection is terminated at the completion of the restore operation. When restoring to a new database, an instance attachment is required to create the database. When restoring to a new remote database, you must first attach to the instance where the new database will reside. Then, create the new database, specifying the code page and the territory of the server. Restore will overwrite the code page of the destination database with that of the backup image.

Procedure

To invoke the restore utility:

Example

Following is an example of the RESTORE DATABASE command issued through the CLP:
db2 restore db sample from D:\DB2Backups taken at 20010320122644