The Archive/Recovery utility can be used to archive and restore all types of temporal tables. Archive operations on temporal tables use the same syntax as nontemporal tables. For temporal tables, the ARCHIVE, RESTORE, and COPY commands can operate on:
Archiving an entire temporal table saves all rows to the archive, including history, current, future, open, and closed rows.
An archive operation can be limited to specified partitions of row-partitioned temporal tables with primary indexes, provided those tables are not also column partitioned. For example, a bitemporal table that is partitioned using the recommended partitioning expression has rows separated into the following partitions:
The archive can be limited to store only the current and history open rows from the first partition.
Use the following guidelines when archiving temporal tables that have been partitioned into current and history rows:
If archiving the current and future rows, ensure the current partition includes only current and future rows by issuing an ALTER TABLE TO CURRENT statement on the table immediately prior to the ARCHIVE operation.
If restoring only current and future rows to an existing temporal table, issue an ALTER TABLE TO CURRENT statement on the table immediately prior to the restore operation.
Teradata recommends a dual archive strategy for temporal tables. Save entire temporal tables in one archive, and the current temporal partitions in a separate archive. The archive containing entire tables can be used to restore temporal tables including history information. The archive containing current partitions can be used for disaster recovery, when restoring history rows is not desired.
For information on... |
See... |
Archive/Recovery Utility |
Teradata Archive/Recovery Utility Reference |
Partitioning temporal tables |
|
ALTER TABLE TO CURRENT |
|