Restore Compared To Copy - Teradata Database

Teradata Database Node Software Migration Guide

Product
Teradata Database
Release Number
15.10
Published
November 2017
Language
English (United States)
Last Update
2018-04-25
dita:mapPath
heq1467819788761.ditamap
dita:ditavalPath
5942_Migrating_1510.ditaval.ditaval
dita:id
B035-5942
lifecycle
previous
Product Category
Software

RESTORE and COPY are the two ARC commands that move data from an archive to a Teradata Database system. However, only the RESTORE command can be used for full-system migrations, as described in this document.

Restoration of database DBC prepares the destination system to expect all user data from the source system with the database IDs and table IDs contained in the original archive. Use the RESTORE command for user data only after the first restoration of database DBC and only once. After restoring user data from the archive, run the post_data_restore script.
Creating new databases or tables after executing the RESTORE command yields new IDs that did not exist in the original archive. In such cases, you cannot use the RESTORE command again to move the additional databases, because the database and table IDs no longer match. Instead, you must use the COPY command followed by the post_data_restore script. For information on using the COPY command in performing a partial data migration without restoration of database DBC, see Teradata Archive/Recovery Utility Reference.

RESTORE Job Scripts

The following table provides some examples of the commands that might be included in your restore job scripts. These are only the ARC commands and are not complete scripts.

You must revalidate referential constraints.
Example Commands
If you have permanent journals, re-create the journal dictionaries using these commands that exclude database DBC. The journal data is not restored. RESTORE DICTIONARY TABLES ALL FROM ARCHIVE,

RELEASE LOCK,

FILE=JNLARCH:

Commands to restore the data tables without restoring database DBC and other databases that are recreated by DIP scripts.

These commands restore user databases, secondary indexes, and fallback.

RESTORE DATA TABLES (DBC) ALL,

EXCLUDE(DBC), EXCLUDE(TD_SYSFNLIB), EXCLUDE(CRASHDUMPS), EXCLUDE(DBCEXTENSION), EXCLUDE(SYSBAR), EXCLUDE(SYSLIB), EXCLUDE(SYSSPATIAL), EXCLUDE(SYSUDTLIB),

RELEASE LOCK,

FILES=ARCHIVE;

Release the host utility locks with this command. RELEASE LOCK (DBC) ALL;
You must revalidate referential constraints with these commands. REVALIDATE REFERENCES FOR (DBC) ALL,

EXCLUDE (DBC), (TD_SYSFNLIB)

RELEASE LOCK;

Restore Warning Messages

Using the RESTORE command may result in warning messages that you should review. Certain of these messages may require subsequent action to resolve the issue. The following messages related to statistics may require recollection of statistics on the table and column(s) specified in the SQL information contained in the ARC log.
  • ARC0727 CREATE Stat Collection failed with error %s: %s.

    Explanation: An error was encountered while trying to recreate a Stat Collection. The error will include the error number and text returned by the Teradata system.

    For Whom: User

    Notes: Non-Fatal Error

    Remedy: Either resolve the Teradata error that was displayed in the ARC log and reattempt the restore, or recollect statistics on the table and column(s) specified in the SQL information provided in the ARC log.

  • ARC0728 Stat Collection can not be recreated during a cluster restore. Stat Collections should be restored from this archive after all cluster restore and build steps have been completed.

    Explanation: During the dictionary part of a cluster restore, ARC cannot recreate stat collection information, since the data has not yet been restored to the tables. ARC must defer recreating the stat collection until after the data for all tables has been restored.

    For Whom: User

    Notes: Non-Fatal Error

    Remedy: After the cluster restore and build steps have been completed, the user needs to manually recollect the statistics.

  • ARC0729 SHOW Stat Collection query failed with error %s: %s.

    Explanation: An error was encountered while trying to query the definition for a stat collection. The error will include the error number and text returned by the Teradata system.

    For Whom: User

    Notes: Non-Fatal Error

    Remedy: Either resolve the Teradata error that was displayed in the ARC log and reattempt the restore, or recollect statistics on the table and column(s) specified in the SQL information provided in the ARC log.

  • ARC0730 Stat Collection query failed with error %s: %s.

    Explanation: An error was encountered while trying to query the list of SC indexes from the StatsV view in database DBC. The error will include the error number and text returned by the Teradata system.

    For Whom: User

    Notes: Non-Fatal Error

    Remedy: Either resolve the Teradata error that was displayed in the ARC log, or recollect statistics on the table and column(s) specified in the SQL information provided in the ARC log.