16.10 - WAL - 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 WAL (Write Ahead Logging) command returns a formatted display of WAL log records based on an ordinal record number range, such as the 10th through the 20th WAL log records. If no range is given, all of the records are displayed.

Syntax

The online help lists the display options (/P, /S, /M, /L, /X, /H, /V) as /dispopt. You can type the options at the beginning or end of the command.


/P
Positions to the WAL log records. Nothing is displayed unless there is a problem.
/S
Displays a count of the selected WAL log records.
/M
Displays the type, WLSN, and other generic WAL log record headers, in addition to the information displayed by the /S option.
/L
Displays the type-specific WAL log record headers for NONTJ and TJ records, in addition to the information displayed by the /M option.
/X
Displays the change data (before and after images) in hexadecimal, in addition to the information displayed by the /L option.
/H
Displays the header in hexadecimal, in addition to the information displayed by the /L option.
/V
Validates the WAL log records instead of displaying them. This option performs as much checking as possible without running SCANDISK, which requires starting the normal file system. See SCANDISK.
ordinalrange
Specifies the range of WAL log records to be displayed by ordinal position. If no range is given, all of the records are displayed. This differs from the TABLE command, which requires an ordinalrange argument.
For more information, see Specifying Display Ranges (ordinalrange).
The online help lists this option as rangeopt.
whereclause
Restricts the selection to a subset of the WAL log records within the ordinal range based on the field content of the records. For more information, see Specifying a WHERE Clause.

Usage Notes

The WAL command displays fully formatted WAL log records, including Transient Journal (TJ) subtypes. It displays before/after image content in hexadecimal. WAL formats the WAL log records according to the WAL log record kind. For more information on the WAL log record kinds and sub-kinds, see Specifying a WHERE Clause.

WAL displays WAL log records by ordinal record number. To choose records based on the WAL log sequence number (WLSN) stored inside the records, use the WREC command. For more information, see WREC.

The whereclause for the WAL command is applied in conjunction with the ordinalrange argument. The whereclause is recorded as part of the context and remains active for subsequent DISPLAY, NEXT, and PREV commands.

Like the TABLE command, WAL has an initial context and a resulting context. The initial context is used to interpret the ordinalrange argument for the WAL command. The resulting context is produced by executing the WAL command. The initial context is unrelated to prior commands as explained below.

The initial context encompasses the first WAL log record to the last, and the ordinalrange for the WAL command is interpreted with respect to this initial context. Therefore, the BEG and END identify the first and last WAL log records. Similar to the TABLE command, positive integers without the BEG/END prefix are considered to be ordinal record numbers, where 1 is the first record. Negative integers without the BEG/END prefix are backwards displacements from the last record, where -1 is the second to last record.

This differs from the interpretation of an ordinalrange for the DISPLAY command, where integers without the BEG/END prefix always refer to objects outside the current context, so that positive values refer to objects past the end of the current context, and negative values refer to objects before the beginning of the current context.

For more information, see TABLE, DISPLAY, and Specifying Display Ranges (ordinalrange).

The resulting context from a WAL command is a WAL log record or WAL log record range that matches the records selected. The resulting context from a TABLE command is a whole subtable, a subtable range, or null, but never a row range. For the TABLE command, the ordinalrange can restrict the display to a subset of the resulting context, even though this ordinalrange has no effect on the resulting context. The WAL command does not adopt this behavior.