When restoring all AMPs from a cluster archive, restore the dictionary archive first. Restoring the dictionary archive:
Remove tables from the restoring state with the BUILD DATA TABLES statement. This statement also revalidates any existing secondary indexes. The build operation should follow the restore of all cluster archives that represent the complete archive.
Note: To avoid duplicate rows, do not run multiple copy operations from a single cluster archive.
Restoring Cluster Archives in Parallel
If restoring cluster archives in parallel, execute multiple jobs at the same time. Each of these jobs must have a different Teradata Database user identification because Teradata Archive/Recovery Utility does not allow concurrent restore operations by the same user.
Exclusive Locks
Each cluster restore requests exclusive locks within the various clusters. Therefore, the locks applied during the dictionary restore must be released prior to concurrent cluster restores.
Build Data Tables Operation
BUILD is run automatically for the primary data and all NUSIs. If the NO BUILD option is specified for a cluster restore and USI exists on one or more objects, a separate BUILD must be run on those objects after the entire cluster restore has completed. After completing a restore of an all cluster archive, perform the build data tables operation against the tables that were restored. This generates the fallback copy of fallback tables and any indexes of fallback and nonfallback tables.
Rollforward Operation
If the build operation completes the recovery process and no rollforward operation is performed, releasing the locks is permissible.
If a rollforward is required, do it after the build operation using the guidelines described in “Recovering Tables and Databases” on page 74.
To learn about the rollforward operation, see “ROLLFORWARD” on page 249.
Example
This example shows how to restore a cluster. The procedure is divided into three steps. Run Step 1 first, then run Steps 2 and 3 in parallel. Finally, run Step 4.
Job 1 |
LOGON USER1,USER1;
RESTORE DICTIONARY TABLES (USERDB),
RELEASE LOCK,
FILE=ARCHIVE;
LOGOFF;
|
Job 2 (run in parallel with Job 3) |
LOGON USER1,USER1;
RESTORE DATA TABLES (USERDB),
CLUSTER=0, 1,
FILE=ARCHIVE;
LOGOFF;
|
Job 3 (run in parallel with Job 2) |
LOGON USER2,USER2;
RESTORE DATA TABLES (USERDB),
CLUSTER=2, 3,
FILE=ARCHIVE;
LOGOFF;
|
Job 4 |
LOGON USER1,USER1;
BUILD DATA TABLES (USERDB),
RELEASE LOCK;
LOGOFF;
|