Example 2: DB-Level Restore Using Two Restore Statements - TARA/ABU

Teradata Archive/Recovery Utility Reference

Product
TARA/ABU
Release Number
16.10
Published
May 2017
Language
English (United States)
Last Update
2018-05-01
dita:mapPath
utr1488824663491.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2412
lifecycle
previous
Product Category
Teradata Tools and Utilities

DB-level Archive:

ARCHIVE DATA TABLES
(SYSDBA),
RELEASE LOCK,
FILE=ARCHIVE;

DB-level Restore with Exclude tables from the DB-level Archive:

RESTORE DATA TABLES
  (SYSDBA)
    (EXCLUDE TABLES (TransactionHistory)),
RELEASE LOCK,
FILE=ARCHIVE;

TB-level Selected Partitions Restore from the DB-level Archive:

RESTORE DATA TABLES
 (SYSDBA.TransactionHistory)
   ( PARTITIONS WHERE
    (! TransactionDate = DATE ‘2004-03-15’
     !) ),
RELEASE LOCK,
FILE=ARCHIVE;

When you break down the restore into two separate restore statements, each restore statement requires a rewind back to the beginning of the archive file. Now, when the TB-level Selected Partitions Restore statement is executed, you don't need to do a backward reposition since you are already at the beginning of the archive file. You can just read forward in the archive file to find the PPI table. This will avoid the following error: The sequence of calls is incorrect.