Using Scripts
To restore the database, use the db2 restore command. Set restore parameters according these guidelines:
The restore statement must specify the same number of sessions as the backup on which it is based.
When specified, the "taken at" parameter must match the timestamp of the desired backup exactly. These can be found on records labeled CATRECORD in the file BEXdb2.log, which is in the logs subdirectory of the directory in which DPX is installed.
If "taken at" is not specified, the latest backup is used for the restore, and the number of sessions specified in the restore must match.
Always follow IBM recommended guidelines.
The following is a UNIX example of a DB2 restore script, which includes environment settings as well as the db2 restore statement:
The DB2 installation program for UNIX generates a sample script similar to the one above called db2restore, which is in the bin subdirectory of the directory in which DPX is installed. You can edit the sample script and then use it as your DB2 restore script in the INSTHOME directory.
Note. The script displayed above is an example of how to invoke DB2 support on DB2 UDB EE. On the Extended Enterprise version (EEE), restores can be run simultaneously on multiple nodes by using the db_all command.
Last updated