Sample Teradata ARC Scripts - TARA/ABU

Teradata Archive/Recovery Utility Reference

Product
TARA/ABU
Release Number
15.00
Language
English (United States)
Last Update
2018-09-25
dita:id
B035-2412
lifecycle
previous
Product Category
Teradata Tools and Utilities

Sample Teradata ARC Scripts

Example : Archive Script

   LOGON DBCID/USERID,PASSWORD;
   ARCHIVE DATA TABLES (DB1) ALL,(DB2),
   RELEASE LOCK,
   FILE=ARCHIVE;
   LOGOFF;

This script performs these archive operations:

1 ARCMAIN logs on to a Teradata Database pointed to by database DBCID.

2 ARCMAIN places Host Utility (HUT) locks on the databases to be archived before starting the archive operation.

3 The database’s DB1, all its descendent databases, and DB2 are backed up. The operation is performed database by database in alphabetical order.

4 The result of the backup is written to the file pointed to by FILE=.

For Linux and Windows XP/Server 2003: If no IOMODULE and IOPARM runtime parameters are specified (as in the above example), data is written to hard disk.

If IOMODULE and IOPARM are specified, data is written to the tape drive or other media specified and pointed to by IOMODULE and defined by the initialization string to which IOPARM is set.

For an example, see “Starting ARCMAIN from Linux and Windows XP/Server 2003” on page 22.

5 The RELEASE LOCK option releases the HUT locks after the archive of each database is complete.

6 After all databases are archived, the LOGOFF command disconnects ARCMAIN from the Teradata Database.

Example : Restore Script

   LOGON DBCID/USERID,PASSWORD;
   RESTORE DATA TABLES (DB1) ALL, (DB2),
   RELEASE LOCK,
   FILE=ARCHIVE;
   LOGOFF;

This script performs these restore operations:

1 ARCMAIN logs on to a Teradata Database pointed to by database DBCID.

2 ARCMAIN places Host Utility (HUT) locks on the databases to be restored before starting the restore operation.

3 The database’s DB1, all its descendent databases, and DB2 are restored. The operation is performed database by database in alphabetical order.

Note: For each database, these operations are performed table by table in alphabetical order:

  • Primary data is restored.
  • If applicable, fallback and index data are built from primary data.
  • 4 The RELEASE LOCK option releases the HUT locks after the restore of each database is complete.

    5 After all databases are restored, the LOGOFF command disconnects ARCMAIN from the Teradata Database.