Online Archive Example (Using the LOGGING ONLINE ON Statement) - TARA/ABU

Teradata Archive/Recovery Utility Reference

Product
TARA/ABU
Release Number
16.10
Published
May 2017
Language
English (United States)
Last Update
2018-05-01
dita:mapPath
utr1488824663491.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2412
lifecycle
previous
Product Category
Teradata Tools and Utilities
  • Online Logging is enabled at 4PM by executing a stand-alone LOGGING ONLINE ARCHIVE ON statement and table TEST has 5 rows:
    1 AAA
    2 BBB
    3 CCC
    4 DDD
    5 EEE
  • Online archive starts at 5PM by executing an ARCHIVE DATA TABLES statement. At that time, table TEST has only 4 rows: rows 1, 2, 3, and 4. Row 5 was deleted.
    1 AAA
    2 BBB
    3 CCC
    4 DDD
  • During the ONLINE archive: a job modifies row 3 to ‘3 XXX’ and deletes row 2.
  • At the end of the ONLINE Archive job, table TEST has 3 rows:
    1 AAA
    3 XXX
    4 DDD
  • A restore of table TEST is done from the online backup and the contents of table TEST after the restore should be:
    1 AAA
    2 BBB
    3 CCC
    4 DDD
    5 EEE
Explanation of the Restore Result:

This is the contents of the table when Online Logging was enabled at 4PM by the LOGGING ONLINE ARCHIVE ON statement. Once logging is enabled, changes will start getting logged even if the online archive job has not started yet. The changes to table TEST that will be logged into the Online log should include:

a) Delete row 5 (change made before the online archive job)

b) Modify row 3 to ‘3 XXX’ (change made during the online archive job)

c) Delete row 2 (change made during the online archive job)

These changes in the Online log are also archived when the table is archived and when the table is restored, the Online log is also restored and then every change in the restored Online log will get rolled back. The resulting table will be in the same state that existed when Online Logging was first enabled on the table at 4PM.