Error Tables and Indexes - 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

As noted in Error Table Name and Structure, error tables do not have secondary indexes, and primary indexes are non-unique. For example, assume that selected partitions of the following target table are being restored:

CREATE TABLE SalesHistory
   (storeid INTEGER NOT NULL,
   productid INTEGER NOT NULL CHECK(productid > 0),
   salesdate DATE FORMAT 'yyyy-mm-dd' NOT NULL,
   totalrevenue DECIMAL(13,2),
   totalsold INTEGER,
   note VARCHAR(256))
UNIQUE PRIMARY INDEX (storeid, productid, salesdate)
PARTITION BY RANGE_N(salesdate BETWEEN
   DATE '1997-01-01' AND DATE '2000-12-31'
   EACH INTERVAL '7' DAY)
INDEX (productid)
INDEX (storeid);

The restore job creates the following error table by default. The bold text points out pertinent differences from the target table definition.

CREATE  SET  TABLE  RS_SalesHistory,  FALLBACK 
   (storeid INTEGER,
   productid INTEGER,
   salesdate DATE FORMAT 'yyyy-mm-dd',
   totalrevenue DECIMAL(13,2),
   totalsold INTEGER,
   note VARCHAR(256),
   DBCErrorCode INTEGER NOT NULL,
   DBCOldROWID BYTE(10) NOT NULL   )
PRIMARY INDEX (storeid, productid, salesdate)