16.10 - MODIFY REDO - Teradata Database

Teradata Database Support Utilities

prodname
Teradata Database
vrm_release
16.10
created_date
June 2017
category
Configuration
featnum
B035-1180-161K

Purpose

The MODIFY REDO command replays or performs Redo processing on specified WAL log records. The command also determines whether to perform WAL replay during the next file system startup.

Improper use of this command can lead to irreparable data loss.

Syntax



/Y
Prevents Filer from prompting for confirmation before executing the command.
REPLAY LINEAGE
Replays the records in the WAL log with the lineage value specified by wlsn.
Filer will not perform any WAL log analysis before replaying the records. Therefore, be absolutely sure that the specified records must be replayed before using this option. An attempt to replay an obsolete lineage may result in data loss.
wlsn
The lineage number that identifies the Redo records to be replayed by the REPLAY LINEAGE option.
REPLAY WREC
Replays the WAL log record or range of records specified in the wlsnrange.
Only modifications from complete NTAs are committed. If a range of records is specified, Filer will attempt to replay closed NTAs and will skip or discard modifications related to open NTAs in the portion of the log specified.
REPLAY WREC cannot be used if Filer is scoped to multiple AMPs.
Filer will not perform any WAL log analysis before replaying the records. Therefore, be absolutely sure that the specified records must be replayed before using this option. An attempt to replay one or more obsolete records may result in data loss.
wlsnrange
Selects one or a range of WAL log records based on the WAL log sequence number (WLSN) in the record header.
To define wlsnrange, use this syntax:


ACTIVATE
Replays the WAL log records during the next file system startup. Filer scans the WAL log for the most recent checkpoint and restores that checkpoint as the basis for the next WAL replay.
DEACTIVATE
Disables the replay of WAL log records during the next file system startup. This option is useful in cases where so many repairs have been made to the file system that attempting to replay WAL log records during the next file system startup will likely fail.

Usage Notes

The MODIFY REDO command is useful for repairing systems that encounter problems when attempting to replay WAL log records.

MODIFY REDO can be run when Filer is started explicitly on a down (FATAL/OFFLINE status) AMP or when the entire Teradata Database system is down.

Lineage refers to a chain of modifications that occurs on a particular block while the block is in memory. A lineage chain begins when the first modification using WAL is made to an unmodified block in memory. The chain “dies” when the block is written to disk with the accumulated changes. To track a particular lineage, a lineage number is assigned to the block. The MODIFY REDO REPLAY LINEAGE command allows you to process Redo records belonging to a particular lineage.

When a transaction requires one or more changes to multiple blocks, the modifications are tied together via an NTA (Nested Top Action). An NTA joins a series of WAL log records into a single atomic unit. All records participating in a particular NTA must be written completely to the WAL log to be complete. The MODIFY REDO REPLAY WREC command will not process incomplete NTAs.

Example: Replaying WAL log records from a specified WLSN range

The following example replays the WAL log records in the WLSN range from 00491D2 to 000491D4. Since the /Y option is not specified, Filer prompts for confirmation before executing the command.

WREC ==>
modify redo replay wrec 00491D2 to 000491D4
You have chosen to attempt the replay of all records between
00000000000491D2 and 00000000000491D4 inclusive.
WARNING: This command performs the replay of the specified
         WAL records WITHOUT performing the WAL Analysis.
         Erroneous use of this command could potentially
         lead to irrepairable data loss.  Please be sure
         this is the desired action before proceeding.
	Are you sure you want to continue? (Y/N)
y
Command has been sent to Slave tasks.
vproc  0 (0000)  response
SKIPPED : Filer skipped  WAL record with wlsn 00000000000491D2
          Record already applied.
SKIPPED : Filer skipped  WAL record with wlsn 00000000000491D3
          Record already applied.
SKIPPED : Filer skipped  WAL record with wlsn 00000000000491D4
          Record already applied.
Filer attempted to replay a total of 3 record(s).

Example: Replaying WAL log records of a specified lineage

The following example replays all of the WAL log records with a lineage value of 49163.

Filer ==>
modify /y redo replay lin 49163
You have chosen to attempt the replay of all
records with a linwlsn of 0000000000049163
Command has been sent to Slave tasks.
vproc  0 (0000)  response
REPLAYED: Filer replayed WAL record with wlsn 0000000000049165
REPLAYED: Filer replayed WAL record with wlsn 0000000000049166
REPLAYED: Filer replayed WAL record with wlsn 0000000000049167
REPLAYED: Filer replayed WAL record with wlsn 0000000000049168
REPLAYED: Filer replayed WAL record with wlsn 0000000000049187
REPLAYED: Filer replayed WAL record with wlsn 00000000000491BF
Filer attempted to replay a total of 6 record(s).

Example: Activating replay of WAL log records during the next file system startup

The following example activates the replay of WAL log records in the next file system startup.

Filer ==>
modify redo activate next redo
You have chosen to enable the WAL replay on the next
File System startup.
Filer will search from the end of the WAL log for the
latest checkpoint and utilize that checkpoint for the
next startup.
      Are you sure you want to continue? (Y/N)
y
Command has been sent to Slave tasks.
vproc  0 (0000)  response
The    checkwlsn     in segment zero has been updated to 00000000000491E5.
The  chkptredowlsn   in segment zero has been updated to 00000000000491D8.
The maxdeletablewlsn in segment zero has been updated to 00000000000491D8.

Example: Deactivating replay of WAL log records during the next file system startup

The following example disables the replay of WAL log records during the next file system startup. The command has been scoped to four AMPs.

Filer ==>
modify redo deactivate next redo

You have chosen to disable the WAL replay on the next
File System startup.
        Are you sure you want to continue? (Y/N)
> y
y
vproc  0 (0000)  response
The WAL replay has been deactivated for the next File System
startup.
To undo this command, you can issue the following:
    MODIFY REDO ACTIVATE NEXT
vproc  1 (0001)  response
The WAL replay has been deactivated for the next File System
startup.
To undo this command, you can issue the following:
    MODIFY REDO ACTIVATE NEXT
vproc  2 (0002)  response
The WAL replay has been deactivated for the next File System
startup.
To undo this command, you can issue the following:
    MODIFY REDO ACTIVATE NEXT
vproc  3 (0003)  response
The WAL replay has been deactivated for the next File System
startup.
To undo this command, you can issue the following:
    MODIFY REDO ACTIVATE NEXT