LOGGING ONLINE ARCHIVE OFF
Purpose
LOGGING ONLINE ARCHIVE OFF ends the online archive process.
Syntax
where
Syntax Element |
Description |
database |
Indicates the database that is included in online archive logging |
ALL |
[Optional] Indicates that the specified database and all of its child databases are included in the statement |
databasename.tablename |
Indicates the table and database that is included in online archive logging |
EXCLUDE |
[Optional] Specifies the databases that are excluded from the statement |
OVERRIDE |
[Optional] Allows online archive logging to be stopped: |
Usage Notes
An 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, Teradata ARC creates a log for the specified table or a separate log for each table in the specified database. LOGGING ONLINE ARCHIVE OFF ends the online archive. The log, which contains all changes to the table, is archived as a part of the archive process. When the table is restored or copied, the changes recorded in the table’s log are used to roll back the changes in the table. In other words, the table is rolled back to the point that was established when online archive logging was started on that table.
LOGGING ONLINE ARCHIVE OFF is used after the archive process has completed, unless the OVERRIDE option is used. If the OVERRIDE option is specified, logging stops even if a table is in the process of being archived. This option is useful for archiving only the dictionary rows of a database, without archiving the database itself.
LOGGING ONLINE ARCHIVE OFF explicitly ends online archive logging on the tables and databases that were just archived or in the process of being archived. When the online archive logging process is terminated, the logging of changed rows is stopped, and the log is deleted.
If the online archive logging process is not terminated on a table after the table has been archived, logging continues, consuming system resources such as CPU cycles and perm space. In time, it is possible to run out of perm space, causing the Teradata Database to crash.
If any table is still enabled for Online Logging either after the archive is finished or due to a graceful abnormal termination of Teradata ARC, a warning message appears that indicates one or more tables are still enabled for online logging. For more details, see section “Archiving Online” on page 45.
Example
This example stops online archive logging on Table1.
LOGGING ONLINE ARCHIVE OFF FOR (DatabaseA.Table1);
Example
This example stops online archive logging on all the tables in the DatabaseA.
LOGGING ONLINE ARCHIVE OFF FOR (DatabaseA);
Example
This example archives only the dictionary rows of DatabaseA, without archiving the database itself.
LOGGING ONLINE ARCHIVE ON FOR (DatabaseA);
ARCHIVE DICTIONARY TABLES (DatabaseA), RELEASE LOCK, FILE=ARCHIVE;
LOGGING ONLINE ARCHIVE OFF FOR (DatabaseA), OVERRIDE;