Archiving Selected Partitions of PPI Tables
An all-AMPs archive on one or more partitions of a table can be performed rather than performing a full-table backup and restore. This feature is limited to all-AMP archives. Dictionary, cluster, and journal archives are not supported.
Use selected partitions to archive only a subset of data and avoid archiving data that has already been backed up. (Minimizing the size of the archive can improve performance.)
Before using this feature, be sure to understand “Potential Data Risks When Archiving/Restoring Selected Partitions” on page 38.
For procedures and script examples of selecting partitions, see “Archiving Selected Partitions of PPI Tables” on page 35.
Restrictions on Archiving Selected Partitions
These restrictions apply to archiving selected partitions of a PPI table:
For additional information, see “Potential Data Risks When Archiving/Restoring Selected Partitions” on page 38 and “Considerations Before Restoring Data” on page 50.
Keywords for Archiving Selected Partitions
To perform an archive of selected partitions, specify a conditional expression in the PARTITIONS WHERE option in an ARCHIVE script. This conditional expression should only reference the column(s) that determine the partitioning for the table being archived.
PARTITIONS WHERE Keyword
Use the PARTITIONS WHERE option to specify the conditional expression, which contains a definition of the rows to be archived. To be effective, limit this expression to the columns that determine the partitioning for the table to be archived.
These restrictions apply to the use of PARTITIONS WHERE:
Examples of ARCHIVE Keywords
This example executes an archive of all the rows in the TransactionHistory table in the SYSDBA database for the month of July 2002:
ARCHIVE DATA TABLES
(SYSDBA.TransactionHistory)
(PARTITIONS WHERE
(! TransactionDate BETWEEN DATE ‘2002-07-01’ AND DATE ‘2002-07-31’ !) )
,
RELEASE LOCK,
FILE=ARCHIVE;
Changes Allowed to a PPI Table
The following changes can be made to a PPI table without affecting or preventing the restoration of data from an archive of selected partitions:
Other changes to a PPI table are more significant in that they affect the DBC.TVM.UtilVersion. Do not restore archives of selected partitions if the archive UtilVersion does not match the table UtilVersion. DBC.TVM.UtilVersion is initially set to 1. ALTER TABLE increases the value of DBC.TVM.UtilVersion to match the table DBC.TVM.Version whenever the following significant changes occur to the referential integrity of a child table:
When DBC.TVM.UtilVersion is updated for a table, previous archives are invalid for future restores or copies of selected partitions to that table, but a full table restore or copy is still valid. For more information, see the Data Dictionary.