Space announcements

   

This space provides the same content as before, but the organization of the home page has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

LOGSCAN logical log output definition

This topic describes the Logical log output definition syntax of the LOGSCAN statement.

A logical log is a readable version of the DB2 log that contains before and after images of database changes. This syntax specifies the location and format of the output logical log control file and the logical log data file that Log Master creates using the log records selected in your log scan.

For more information about using logical log files as input, see INPUT statement. For more information about Unicode characters in logical log files, see Considerations for output files and Unicode.

The following figure shows the Logical log definition syntax diagram.


DATASET Output definition

Specifies the characteristics of the data set that contains the logical log data file. For more information, see LOGSCAN output definition.

CONTROL Output definition

Specifies the characteristics of the data set that contains the logical log control file. For more information, see LOGSCAN output definition.

XMLSTRING Output definition

Specifies the characteristics of the data set where Log Master stores the XMLSTRING control file. This file contains the string IDs and string data that DB2 uses to encode the data in XML columns. By default, Log Master does not generate this data set.

Specify this file only if you intend to use the output logical log file to migrate data to a different DB2 subsystem. When you apply the changes in the logical log to a different target subsystem, Log Master or the High-speed Apply Engine need the string IDs and data to serialize your XML data correctly. Log Master obtains this data from the DB2 catalog table SYSIBM.SYSXMLSTRINGS.

For more information on specifying the data set characteristics, see LOGSCAN output definition.

RECFM

Documents the record format of the output logical log files. Log Master forces the record format of logical log control and data files to be variable length, and blocked (VB). If Log Master detects that any records in the logical log data file exceed the length restrictions of the VB format, it automatically divides the records into multiple segments and writes those segments to a VB file. For more information, see Normal and segmented logical log record formats.

VBIndicates that records are variable length and blocked.
VBSThis keyword is tolerated for historical reasons, but ignored by the current version of Log Master. If you specify VBS, Log Master writes VB output logical log files
DATEFMT

Specifies the date and time format used in the output logical log.

DB2I

Directs Log Master to use DB2’s internal date and time format. The DB2I format is YYYY-MM-DD-hh.mm.ss.nnnnnn. This is the default value.

When running on DB2 Version 10 and later, Log Master supports precision timestamps up to 12 digits, and inclusion of a time zone in the timestamp (YYYY-MM-DD-HH:MM:SS.nnnnnnnnnnnn±HH:MM).

SASTIMEDirects Log Master to use a date and time format compatible with software developed by the SAS Institute Inc. (a maker of decision support and statistical analysis software). The SASTIME format is YYYY/MM/DD/hh:mm:ss.nnnnnn.
EXPAND VAR

Determines how Log Master writes variable length fields in the output logical log.

YESDirects Log Master to expand (fill) variable length fields with spaces up to the declared maximum length.
NODirects Log Master not to expand (fill) variable length fields. This is the default value.

Log Master does not expand data definition language (DDL) information in the logical log data file, even when this keyword is YES.

INCLUDE ROLLBACK

Determines whether Log Master includes information from compensated log records in the output logical log file. Use the default value of NO for normal processing. In this context, compensated log records are the log records of database changes that DB2 subsequently 'compensates for' or 'reverses' (for example, log records of changes that are later reversed by a ROLLBACK statement). Depending on the value of this keyword, Log Master includes or excludes compensated log records. For more information, see INCLUDE ROLLBACK.

NODirects Log Master to exclude compensated log records. The output logical log file does not reflect any compensated log records. Use this default value for normal processing.
YESDirects Log Master to include compensated log records. The output logical log file reflects both compensated log records and noncompensated log records.
ONLYDirects Log Master to include only compensated log records. The output logical log file does not reflect any noncompensated log records.

Warning

Exercise caution before specifying a value of YES or ONLY. In most circumstances, when you include compensated log records, your output logical log file includes data that has not been applied to the original DB2 database. For example, if you migrate data from one database to another and you use an output logical log file that reflects compensated log records, you can corrupt the data in your target database.

If you do not specify INCLUDE ROLLBACK, Log Master ignores compensated log records. If you specify INCLUDE ROLLBACK without specifying YES or NO, the default value is YES (Log Master includes both compensated and noncompensated log records).

INCLUDE SYNONYMS

Determines whether Log Master includes information about the synonyms and aliases of DB2 tables in the output logical log file. Use this keyword when later processing of the logical log file needs to use or select records based on synonym or alias names. By default, Log Master does not include this information.

To obtain synonym and alias names, Log Master reads the SYSIBM.SYSSYNONYMS table in the DB2 catalog. This processing can slow performance. If you include synonyms or aliases frequently, you can reduce the performance loss by creating an additional index on the SYSSYNONYMS table. The ALPIXSYN member in the HLQ.DBSAMP library contains a sample DDL statement that you can modify to create the additional index. The HLQ value represents a qualifier that your environment assigns during installation.

INCLUDE DDL

Determines whether Log Master includes data definition language (DDL) information in the output logical log file. When the value of this keyword is YES, Log Master writes objects representing DDL activity into the logical log data file.

The DDL objects that Log Master writes in an output logical log file are not the same as the DDL statements that it writes in an output DDL (or SQL) file. A DDL object can represent multiple DDL statements, and a DDL statement can represent multiple insert, update, or delete actions against several tables in the DB2 catalog.

A DDL object that Log Master writes can be interpreted as input by either Log Master itself (using the LLOG keyword of the INPUT statement) or by the High-speed Apply Engine that is distributed with Log Master.

YES

Directs Log Master to include DDL information. The output logical log file includes both DML statements (for insert, update, and delete actions) and DDL objects (representing DDL activity on the subsystem).

NO

Directs Log Master to include only DML statements (for insert, update, delete, or exchange actions).

If you omit the INCLUDE DDL keyword, the default value is NO (Log Master does not include DDL statements). If you specify the INCLUDE DDL keyword, but omit the YES or NO keywords, the default value is YES (DDL objects are included). The DDL objects written in the output logical log file are not affected by the setting of the EXPANDVAR keyword.

Note

It is possible to track DDL activity by selecting insert, update, and delete actions against several DB2 catalog tables (including SYSIBM.SYSTABLES, SYSIBM.SYSCOLUMNS, and several others). You can use the INCLUDE DDL keyword to capture DDL activity, or you can select log records relating to the DB2 catalog tables, but Log Master does not perform both types of processing in the same log scan. If INCLUDE DDL is YES, Log Master ignores any DB2 catalog tables included in your filter. BMC Software recommends that you use the INCLUDE DDL keyword.

Tip

If DDL activity is needed for historical purposes, BMC recommends that you include DSNDB06 insert, update, and delete records in the logical log. Do not keep DDL objects for historical purposes because DDL objects are version specific. If you use DDL objects as input into a newer version of the product, the results can be unpredictable.

See also DDLOBJ=NO.

INCLUDE LOBS

Determines whether Log Master includes the data from large object (LOB) columns in the output logical log. When the value of this keyword is YES, Log Master writes LOB VSAM files and saves them permanently to disk.

Log Master generates one LOB VSAM file for each LOB column (or each partition of a LOB column) that occurs in the selected log records. Log Master allocates an additional LOB VSAM file only when it has filled the initial data set and all possible extents, but more LOB column data remains to be written. Depending on your environment and your LOB data, the additional disk I/O required for the LOB VSAM files can slow Log Master performance.

The names of the LOB VSAM files are determined by a prefix value that you define. For more information, see PREFIX (clusterPrefix) or LOBPREF=&&SYSUID..LOB. If you run this log scan repeatedly and use the output files as input to another execution of Log Master, consider using symbolic values such as &DATE. and &TIME. in the prefix to avoid duplicate data set errors. For more information about how Log Master processes LOB columns and data, see the section on expert information in the Log Master for DB2 documentation .

YESDirects Log Master to include LOB data in the output logical log. Log Master writes permanent LOB VSAM files and includes information about those files in the logical log control file.
NODirects Log Master to avoid including LOB data in the output logical log.
INLINEDirects Log Master to include only inline LOB data in the output logical log, ignoring the auxiliary LOB tables. Log Master writes permanent LOB VSAM files and includes information about those files in the logical log control file.

If you do not specify INCLUDE LOBS, Log Master does not include LOB data. If you specify INCLUDE LOBS without specifying YES, NO, or INLINE, the default value is YES (Log Master includes LOB data).

INCLUDE XML

Determines whether Log Master includes the data from XML columns in the output logical log. When the value of this keyword is YES, Log Master writes XML VSAM files and saves them permanently to disk.

Log Master generates one XML VSAM file for each XML column (or each partition of an XML column) that occurs in the selected log records. Log Master allocates an additional XML VSAM file only when it has filled the initial data set and all possible extents, but more XML column data remains to be written. Depending on your environment and your XML data, the additional disk I/O required for the XML VSAM files can slow Log Master performance.

The names of the XML VSAM files are determined by a prefix value that you define (for more information, see PREFIX (clusterPrefix) or XMLPREF=&&SYSUID..XML). If you run this log scan repeatedly and use the output files as input to another execution of Log Master, consider using symbolic values such as &DATE. and &TIME. in the prefix to avoid duplicate data set errors.

YESDirects Log Master to include XML data in the output logical log. Log Master writes permanent XML VSAM files and includes information about those files in the logical log control file.
NODirects Log Master to avoid including XML data in the output logical log.

If you do not specify INCLUDE XML, Log Master does not include XML data. If you specify INCLUDE XML without specifying YES or NO, the default value is YES (Log Master includes XML data).

INCLUDE COMMAND

Determines whether Log Master includes DB2 command records in the output logical log. When you specify YES or ONLY, Log Master includes all DB2 commands that were issued during the specified time range. Log Master does not filter on command name in the output logical log.

NODirects Log Master to avoid including DB2 command record information in the output logical log. The default value is NO.
YESDirects Log Master to include DB2 command record information in the output logical log.
ONLYDirects Log Master to include only DB2 command record information in the output logical log.

If you do not specify INCLUDE COMMAND, Log Master does not include DB2 command record information. If you specify INCLUDE COMMAND without specifying YES or NO, the default value is YES (Log Master includes DB2 command record information).

INCLUDE STATUS CHANGES

Determines whether Log Master includes database exception (DBE) records that are logged by DB2 utilities.

NODirects Log Master to avoid including DBE records in the output logical log.
YESDirects Log Master to include DBE records in the output logical log.
ONLYDirects Log Master to include only DBE records in the output logical log.

If you do not specify INCLUDE STATUS CHANGES, Log Master does not include DBE records. If you specify INCLUDE STATUS CHANGES without specifying YES, NO, or ONLY, the default value is YES (Log Master includes DBE records).

Column include/exclude

The Column include/exclude definition enables you to control the information in your logical log file based on table columns. If you include columns in (or exclude columns from) your logical log, the same columns are included or excluded from all other forms of output that are defined in the log scan.

For example, if you request both logical log and SQL output files, and you exclude the ROWID column of a LOB column from the output logical log file, Log Master excludes the LOB column from the output SQL file as well. In this situation, Log Master cannot generate the SQL for the LOB column because the ROWID was removed from the logical log record that it was processing. This limitation also applies to the DOCID column of an XML column.

For more information about including or excluding column data, see LOGSCAN column include/exclude definition.

Related topic


Was this page helpful? Yes No Submitting... Thank you

Comments