in black and white
Main menu
Share a book About us Home
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics

Teradata RDBMS Database Administration - NCR

NCR Teradata RDBMS Database Administration - NCR , 2004. - 616 p.
Download (direct link): teradatadatabaseadmin2004.pdf
Previous << 1 .. 119 120 121 122 123 124 < 125 > 126 127 128 129 130 131 .. 218 >> Next

ROLLBACK commands help you recover from one or more transaction errors and reverses changes made to a database or table.

ROLLFORWARD commands help you recover from hardware errors. These commands replace existing row data with after-change images.

DELETE JOURNAL command erases the contents of either the restored subtable or the saved subtable in the permanent journal.

Teradata features several recovery control system views that contain information about ARC utility events.

Data Recovery Using Roll Operations

The restore statement allows you to move information from archive files back to the Teradata database. The restore operation can restore data or journal tables.

After you execute a RESTORE statement, data tables are ready to use.

When you restore a journal table, the system restores the information to a permanent journal subtable. Before you can use the tables, you must perform a rollback or rollforward operation to move the journal tables back to the data tables.

Roll operations can use either the current journal or the restored journal. If you specify the current journal, then the ARC utility uses information stored in both the active and saved subtables.

A permanent journal is checkpoint-oriented rather than transaction-oriented. The goal of the journals is to return existing data tables to some previous or subsequent checkpoint. For example, if a batch program corrupted existing data, the rollback operation would return the data to a checkpoint prior to the running of the batch job.

A rollforward operation might occur after an all-AMP restore. After you move the data and journal archive files back to the database, the data tables would only include changes committed since the last full backup. Any intermediate

8 - 10 Teradata RDBMS Database Administration

Chapter 8: Archiving, Restoring and Recovering Data

Arc Recovery versus FastLoad

changes would reside in the journal tables. The rollforward operation would replace the existing data with changes from the journal table.


The RESTORE function copies journal archive files to the restored subtable of the permanent journal.

ROLLBACK and ROLLFORWARD statements apply journal table contents to data tables.

Roll operations can use either Current journal (active and saved subtables) or Restored journal (restored subtable).


Use the CHECKPOINT statement to indicate a recovery point in the Journal.

The CHECKPOINT statement places a marker row after the most recent change image row in the active subtable of a permanent journal.

DBS assigns an event number to the marker row and returns the number in response. You may assign a name to the CHECKPOINT command rather than use the event number in subsequent ARC activities.

Options to the CHECKPOINT statement include:

CHECKPOINT Option Description
WITH SAVE The CHECKPOINT WITH SAVE option allows you to archive and delete saved journal images. The archive saves journal images to a host media. The saved journal subtable has no fixed size and can grow to the limit of the database. After you archive the saved area of the journal, you can delete this section of the current journal to make space for subsequent saved journal images. The CHECKPOINT WITH SAVE option inserts a marker row and appends any stored images preceding the marker row from the active to the saved subtable. The database automatically initiates a new active subtable. You can dump the contents of the saved subtable to an archive file.
Offline AMPs Use this option when an individual AMP is offline at the time you issue the checkpoint command. This generates an entry in the system log that marks the checkpoint as soon as the AMP comes back on-line. The system startup process generates the checkpoint and requires no user input.

8 - 10

Teradata RDBMS Database Administration Chapter 8: Archiving, Restoring and Recovering Data

Arc Recovery versus FastLoad

CHECKPOINT Option Description
USE LOCK By default, the system acquires a read lock on all tables assigned to the journal being checkpointed. A checkpoint with save may optionally use an access lock. The read lock suspends update activity for all data tables that might write changes to the journal table during checkpoint. This lock provides a clean point on the journal. The access lock accepts all transactions that insert change images to the journal, but it treats them as though they were submitted after the checkpoint was written. The access lock option requires that you also use the WITH SAVE option. A checkpoint with save under an access lock is only useful for coordinating rollforward activities from the restored journal, and then from the current journal.
NAMED checkpointname Checkpoint names may be up to 30 characters long and are not case-specific. Teradata software always supplies an event number for each checkpoint. Use the number to reference a checkpoint if a name is not supplied. If there are duplicate checkpoint names in the journal and an event number is not specified: Rollforward uses the first (oldest) occurrence. Rollback uses the last (latest) occurrence.
Previous << 1 .. 119 120 121 122 123 124 < 125 > 126 127 128 129 130 131 .. 218 >> Next