Performing a redirected restore using an automatically generated script
When you perform a redirected restore operation, you must specify the locations of physical containers that are stored in the backup image and provide the complete set of containers for each table space that you are altering.
Before you begin
You can perform a redirected restore only if the database was previously backed up using the Db2® backup utility.
About this task
- If the database exists, you must be able to connect to it in order to generate the script. Therefore, if the database requires an upgrade or crash recovery, this must be done before you attempt to generate a redirected restore script.
- If you are working in a partitioned database environment, and
the target database does not exist, you cannot run the command to
generate the redirected restore script concurrently on all database partitions.
Instead, the command to generate the redirected restore script must
be run one database partition at a time, starting from the catalog
partition.
Alternatively, you can first create a dummy database with the same name as your target database. After the dummy database is created, you can then generate the redirected restore script concurrently on all database partitions.
- Even if you specify the REPLACE EXISTING parameter when you issue the RESTORE DATABASE command to generate the script, the REPLACE EXISTING parameter is commented out in the script.
- For security reasons, your password does not appear in the generated script. You need to enter the password manually.
- The restore script includes the storage group associations for every table space that you restore.
Procedure
To perform a redirected restore using a script: