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 BMC AMI 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.


GUID-64994072-4F56-4F78-A034-D237A121D72C-low.png.png

Option

Description

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 BMC AMI 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, BMC AMI 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, BMC AMI Log Master or the High-speed Apply Engine need the string IDs and data to serialize your XML data correctly. BMC AMI 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. BMC AMI Log Master forces the record format of logical log control and data files to be variable length, and blocked (VB). If BMC AMI 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.

Value

Description

VB

Indicates that records are variable length and blocked.

VBS

This keyword is tolerated for historical reasons, but ignored by the current version of BMC AMI Log Master. If you specify VBS, BMC AMI Log Master writes VB output logical log files

DATEFMT

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

Value

Description

DB2I

(Default) Directs BMC AMI Log Master to use Db2’s internal date and time format. The DB2I format is YYYY-MM-DD-hh.mm.ss.nnnnnn.

SASTIME

Directs BMC AMI 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 BMC AMI Log Master writes variable length fields in the output logical log.

Value

Description

YES

Directs BMC AMI Log Master to expand (fill) variable length fields with spaces up to the declared maximum length.

NO

(Default) Directs BMC AMI Log Master not to expand (fill) variable-length fields.

BMC AMI 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 BMC AMI 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, BMC AMI Log Master includes or excludes compensated log records. For more information, see INCLUDE ROLLBACK.

Value

Description

NO

Directs BMC AMI 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.

YES

Directs BMC AMI Log Master to include compensated log records. The output logical log file reflects both compensated log records and non-compensated log records.

ONLY

Directs BMC AMI Log Master to include only compensated log records. The output logical log file does not reflect any non-compensated 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, BMC AMI Log Master ignores compensated log records. If you specify INCLUDE ROLLBACK without specifying YES or NO, the default value is YES (BMC AMI Log Master includes both compensated and non compensated log records).

INCLUDE SYNONYMS

Determines whether BMC AMI 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, BMC AMI Log Master does not include this information.

To obtain synonyms and alias names, BMC AMI 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 BMC AMI Log Master includes data definition language (DDL) information in the output logical log file. When the value of this keyword is YES, BMC AMI Log Master writes objects representing DDL activity into the logical log data file.

The DDL objects that BMC AMI 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 BMC AMI Log Master writes can be interpreted as input by either BMC AMI Log Master itself (using the LLOG keyword of the INPUT statement) or by the High-speed Apply Engine that is distributed with BMC AMI Log Master.

Value

Description

YES

Directs BMC AMI 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 BMC AMI 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 (BMC AMI 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.

Important

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 BMC AMI Log Master does not perform both types of processing in the same log scan. If INCLUDE DDL is YES, BMC AMI Log Master ignores any Db2 catalog tables included in your filter. We recommend that you use the INCLUDE DDL keyword.

Tip

If DDL activity is needed for historical purposes, we recommend 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 BMC AMI Log Master includes the data from large object (LOB) columns in the output logical log. When the value of this keyword is YES, BMC AMI Log Master writes LOB VSAM files and saves them permanently to disk.

BMC AMI 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. BMC AMI 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 BMC AMI 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 BMC AMI 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 BMC AMI Log Master processes LOB columns and data, see Specifying-LOB-columns.

Value

Description

YES

Directs BMC AMI Log Master to include LOB data in the output logical log. BMC AMI Log Master writes permanent LOB VSAM files and includes information about those files in the logical log control file.

NO

Directs BMC AMI Log Master to avoid including LOB data in the output logical log.

INLINE

Directs BMC AMI Log Master to include only inline LOB data in the output logical log, ignoring the auxiliary LOB tables. BMC AMI 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, BMC AMI Log Master does not include LOB data. If you specify INCLUDE LOBS without specifying YES, NO, or INLINE, the default value is YES (BMC AMI Log Master includes LOB data).

INCLUDE XML

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

BMC AMI 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. BMC AMI 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 BMC AMI 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 BMC AMI Log Master, consider using symbolic values such as &DATE. and &TIME. in the prefix to avoid duplicate data set errors.

Value

Description

YES

Directs BMC AMI Log Master to include XML data in the output logical log. BMC AMI Log Master writes permanent XML VSAM files and includes information about those files in the logical log control file.

NO

Directs BMC AMI Log Master to avoid including XML data in the output logical log.

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

INCLUDE COMMAND

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

Value

Description

NO

(Default) Directs BMC AMI Log Master to avoid including Db2 command record information in the output logical log.

YES

Directs BMC AMI Log Master to include Db2 command record information in the output logical log.

ONLY

Directs BMC AMI Log Master to include only Db2 command record information in the output logical log.

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

INCLUDE STATUS CHANGES

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

Value

Description

NO

Directs BMC AMI Log Master to avoid including DBE records in the output logical log.

YES

Directs BMC AMI Log Master to include DBE records in the output logical log.

ONLY

Directs BMC AMI Log Master to include only DBE records in the output logical log.

If you do not specify INCLUDE STATUS CHANGES, BMC AMI Log Master does not include DBE records. If you specify INCLUDE STATUS CHANGES without specifying YES, NO, or ONLY, the default value is YES (BMC AMI 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, BMC AMI Log Master excludes the LOB column from the output SQL file as well. In this situation, BMC AMI 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.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*