Example 1: DB-Level Partitions Restore - 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 Selected Partitions Restore from the DB-level Archive:

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

This format of the restore statement combines a DB-level restore with a TB-level selected partitions restore of a PPI table using the same database object in the same restore statement. In some instances, executing this format of the restore statement may fail with an error similar to the following:

*** Failure ARC0805:Access Module returned error code 34: Error BAM1300: 5:The sequence of calls is incorrect.

This error is indicative of a failure to correctly process the 2nd part of the statement. To process this statement, Teradata ARC needs to process the database object twice to complete the restore. During the 1st pass, Teradata ARC restores all of the objects in the database object except for the excluded PPI table. Then Teradata ARC must make a 2nd pass through the database object to re-find the PPI table so that the TB-level Selected Partitions Restore of the PPI table can be processed. In order to do the 2nd pass, Teradata ARC must reposition back to the beginning of the database object to re-read the database object. It is when the backward reposition is attempted that you may get the "The sequence of calls is incorrect" error.

If you get this error (or something similar), this restore job must be broken down into 2 separate restore steps:

  1. First, you must execute a DB-level restore statement to restore the DB-level object while excluding the PPI table.
  2. Second, you must execute a separate TB-level restore statement to do the selected partitions restore of the PPI table.

These 2 restore statements may be included in the same job or split up into 2 separate jobs.