15.10 - Online Archive - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

prodname
Preprocessor2 for Embedded SQL
vrm_release
15.10
category
Programming Reference
featnum
B035-2446-035K

Online archive is a process in which rows are archived from a table at the same time update, insert, or delete operations on the table are taking place. When an online archive is initiated on a table or a database, a log is created for the specified table or separate logs are created for each table in the specified database. The log, which contains all changes to the table, is saved as a part of the archive process. The changes recorded in the log can be applied to any changes to the table that occurred during the archive, such as a restore operation.

Two new SQL statements start and stop the online archive process: LOGGING ONLINE ARCHIVE ON and LOGGING ONLINE ARCHIVE OFF.

The following SQL statement initiates the online archive process for the database on a weekly basis:

EXEC SQL
                   LOGGING ONLINE ARCHIVE ON FOR WEEKLY;

The following SQL statement stops the weekly online archive of the database:

EXEC SQL
                   LOGGING ONLINE ARCHIVE OFF FOR WEEKLY;