Table-Level Exclude Option with ARCHIVE - 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

Table-Level Exclude Option with ARCHIVE

The table-level exclude object option is allowed in an ARCHIVE statement (and in COPY and RESTORE statements). This option is only accepted in a database-level object in a DATA TABLES of all-AMPs or cluster operations. A database-level object that has one or more excluded objects is a partial database.

An archive of a partial database contains the dictionary information and if the excluded object has data, the table header row of the excluded object. However, the actual data rows are not archived. If a partial database archive is restored, the table header row is restored for the excluded objects with data, but no data rows.

If an object is excluded, Teradata ARC restores the dictionary information and the table header row (if present), but leaves the table in restore state. This prevents the table from being accessed by another application before the table level restore is performed. A table-level restore for the excluded objects is expected to follow the partial database restore to fully restore a partial database.

If a table-level restore of the excluded object(s) is not going to be run, run a BUILD statement for the excluded objects. The excluded objects become accessible but empty, and can then be dropped.

If the ALL keyword is not specified after the object name, either non-qualified object names (without a database name prefix) or fully qualified object names (databasename.tablename) can be specified in the list of EXCLUDED TABLES. If a non-qualified object name is specified, it is presumed to belong to the source database that it is associated with.If the ALL keyword is specified after the object name, then only fully qualified object names in the form of databasename.tablename are accepted in the list of EXCLUDE TABLES.

Do not use EXCLUDE TABLES with the following options:

table level object: (db.tb) - DICTIONARY, JOURNAL, NO FALLBACK - AMP=.

Teradata ARC issues ARC0215 if any of the above conditions is detected.

For a list of individual object types that can be specified in the EXCLUDE TABLES clause for Archive, see Appendix C.

Notice:

During a full database-level restore of an archive with excluded objects, the data dictionaries and the table headers of all objects, including excluded objects, are replaced. As a result, all of the existing rows in the excluded objects are deleted. To leave an existing excluded object intact during a restore or copy, use the EXCLUDE TABLES option in the RESTORE or COPY statement. For more details, see “RESTORE” on page 221 and “COPY” on page 189.

Restoring individual objects from a database-level archive with excluded objects is supported. In the RESTORE statement, individually specify all the objects to be restored, except the excluded objects. By omitting the excluded objects, the data dictionaries and table headers of the excluded objects are preserved. The database is restored from the archive without altering the excluded objects.

Table-Level Exclude Errors

The following error messages can occur when using the table-level exclude object option in an ARCHIVE statement.

ARC0106: “User excluded table(s) (%s) does/do not belong to database %s”

One or more tables specified in the EXCLUDE TABLES object option do not belong to the database object.

This is only a warning. No action is required; the archival will continue.

ARC0107: “%s is a %s. Not excluded.”

Views, macros, stored procedures, and triggers are not allowed in the EXCLUDE TABLE list. Only tables are allowed in the EXCLUDE TABLE list. Teradata ARC ignores this entry and continues the operation.

Remove the entry from the EXCLUDE TABLE list.

ARC0108: “Invalid table name in EXCLUDE TABLE list: %s.%s”

This error occurs when a table specified in EXCLUDE TABLE list does not exist in the database. Correct the table name and resubmit the job.

ARC0109: “One or more tables in EXCLUDE TABLE list for (%s) ALL is/are not valid”

This error occurs when validation of one or more tables in the EXCLUDE TABLE list failed. The invalid table names displayed prior to this error. Correct the database/table name and resubmit the job.

ARC0110: “%s is not parent database of %s in EXCLUDE TABLE list”

This error occurs when a table specified in EXCLUDE TABLE list does not belong to any of the specified parent’s child databases. Correct the database/table name and resubmit the job.

ARC0710: "Duplicate object name has been specified or the table level object belongs to one of database level objects in the list: %s"

The severity of ARC0710 has been changed to FATAL (12) from WARNING (4).

Do not specify excluded tables in a statement that also contains the database excluding them (unless using the PARTITIONS WHERE option to archive selected partitions of PPI tables, in which excluded tables are allowed). For example:

ARCHIVE DATA TABLES (db) (EXCLUDE TABLES (a)), (db.a), RELEASE LOCK, FILE=ARCHIVE; /* ARC0710 */

This fatal error resulted from one of the following:

  • the specified object is a duplicate of a previous object in the list
  • the specified object is a table level object that belongs to one of the database-level objects in the list
  • the ALL option has been specified and one of the child databases is a duplicate of an object explicitly specified in the list
  • the object name was longer than 30 characters
  • Remove one of the duplicate names or the table level object, or edit the length of the object name. Resubmit the script.

    ARC1242 “Empty Table restored/copied: %s”

    When restoring a table excluded by a user, this warning will be displayed. It normally displays during archiving for the tables that have been excluded. No data rows were restored or copied. Only the dictionary definition and the table header row were restored or copied.

    This warning indicates that a table-level restore/copy must follow in order to fully restore the database.

    The table is currently in restore state. Do one of the following:

  • Complete the partial restore of the database by running a table level restore/copy of the table, or
  • Access the table by running an explicit build. This results in an empty table.