Online Archive - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

Product
Preprocessor2 for Embedded SQL
Release Number
15.00
Language
English (United States)
Last Update
2018-09-27
dita:id
B035-2446
lifecycle
previous
Product Category
Teradata Tools and Utilities

Online Archive

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.

Example  

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

EXEC SQL
                   LOGGING ONLINE ARCHIVE ON FOR WEEKLY;

Example  

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

EXEC SQL
                   LOGGING ONLINE ARCHIVE OFF FOR WEEKLY;