EXCLUDE TABLES Keyword - 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

During a database-level RESTORE, the EXCLUDE TABLES option can be used to skip the restore of one or more objects from the archive file to the target database. If a object is excluded, Teradata ARC will not restore any of the dictionary information or any of the object data for the specified object(s). If any of the specified object(s) already exist in the target database, they are unaffected by the RESTORE operation. By not restoring any information/data for the specified object, the EXCLUDE TABLES option can also be used to prevent the deletion of existing objects from the target database during a restore.

Use the EXCLUDE TABLES option to skip the restore of a object from the archive file. If the object already exists in the target database, it will be unaffected by the RESTORE operation. If the RESTORE is run without the EXCLUDE TABLES option, the target object is dropped and replaced by the dictionary information and data stored in the archive file for that object.

Use the EXCLUDE TABLES option to skip the restore of an excluded object from the archive file. When a object is excluded during the archive, the only things archived for that object are the dictionary information and the table header, but no object data. If the excluded object is restored, the target object will be dropped and replaced by the dictionary information for that object. But since there is no data in the archive file for that object, no data will be restored, which will produce an empty object. To prevent replacing an existing object with an empty object due to that object being excluded during the archive, use the EXCLUDE TABLES option to skip the restore of that object. By using the EXCLUDE TABLES option, that object will be unaffected by the RESTORE operation if it currently exists in the target database.

Use the EXCLUDE TABLES option to prevent the deletion of new objects from the target database. During a normal RESTORE of a database-level object, all objects in the target database are dropped before the objects from the archive file are restored to it. If a new object has been added to the target database since the archive was taken, you will have a situation where the archive file does not have any archived data for that new object. If you were to run a restore without the EXCLUDE TABLES option, Teradata ARC will drop that new object from the target database even though there is no data in the archive file to restore for that object. To prevent dropping the new object during the restore, use the EXCLUDE TABLES option to specify the new object in the target database. This will tell Teradata ARC to not drop that object from the target database during the restore. By using the EXCLUDE TABLES option, the new object in the target database will be unaffected by the RESTORE operation.

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 EXCLUDE TABLES. If a non-qualified object name is specified, it is presumed to belong to the database that it is associated with in the RESTORE statement.

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.

The EXCLUDE TABLES option can only be used with database-level objects.

The EXCLUDE TABLES option can not be used when ALL FROM ARCHIVE is specified.

If a specified object is in neither the archive file nor the target database, the restore of the database will be skipped.

For a list of individual object types that can be specified in the EXCLUDE TABLES clause for Restore, see Excluding Tables.

There is no explicit maximum length for a EXCLUDE TABLES clause, but when the EXCLUDE TABLES clause specified is too long to fit in the SQL buffer, the SQL request can not be sent to the database. The buffer that is used to send the EXCLUDE TABLES clause to the database has a maximum length and the EXCLUDE TABLES must fit completely within that buffer. Since other data may exist in the buffer and may be variable in length, a max size for a EXCLUDE TABLES clause cannot be given. If the above situation occurs, ARC will display following error message: ARC0127: “EXCLUDE TABLES list is too long to fit in the SQL buffer.” Modify the EXCLUDE TABLES list to reduce its size and resubmit the job.