-
Perform a full-table archive:
ARCHIVE DATA TABLES
(SYSDBA.TransactionHistory),
RELEASE LOCK,
FILE=ARCHIVE;
-
Set up incremental archives:
ARCHIVE DATA TABLES
(SYSDBA.TransactionHistory)
( PARTITIONS WHERE
(! TransactionDate BETWEEN CURRENT_DATE – 3 AND CURRENT_DATE
!) ),
RELEASE LOCK,
FILE=ARCHIVE;
In this example, ‘CURRENT_DATE – 3’ archives a partition even after it becomes non-active, in case the final archive of the partition fails or the value of CURRENT_DATE changes during the final backup.
-
Set up differential backups:
ARCHIVE DATA TABLES
(SYSDBA.TransactionHistory)
( PARTITIONS WHERE
(! TransactionDate BETWEEN DATE ‘2004-01-01’ AND DATE ‘2004-03-31’
!) ),
RELEASE LOCK,
FILE=ARCHIVE;
-
(Optional) Perform a separate partition backup if updating a partition that is not archived by the incremental backup step (step 2):
ARCHIVE DATA TABLES
(SYSDBA.TransactionHistory)
( PARTITIONS WHERE
(! TransactionDate = DATE ‘2004-03-15’
!) ),
RELEASE LOCK,
FILE=ARCHIVE;