LOGSCAN column include/exclude definition


This topic describes the Column include/exclude definition syntax of the LOGSCAN statement.

This syntax enables you to explicitly control which table columns appear in the generated output. For example, you can create a report that does not print the information in a sensitive column, or you can generate MIGRATE SQL that duplicates only certain columns into another database.

Related topic

Column include/exclude definition syntax diagram

GUID-F7749BAC-A92D-45AA-B652-DD749DE44801-low.png

Be aware of the following points regarding included or excluded columns:

  • If you include columns in (or exclude columns from) a logical log file, the same columns are included in or excluded from all other forms of output that are defined for 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.

  • If you exclude columns from an output SQL file, and the Db2 log for your selected objects contains an update action that affects only the excluded columns, BMC AMI Log Master:
    • Does not generate an UPDATE statement
    • Increments the 'updates eliminated' value in message BMC097226
    • Includes an ANSI-standard comment in the SQL file to note the omitted update action
  • Do not confuse the Column include/exclude definition with a filter predicate that selects records based on a specific column. The differences are as follows:
    • A Column include/exclude definition affects the entire column in the output (regardless of the value in the column). If you exclude a column, the output does not contain the specified column at all.
    • A filter predicate based on a column value affects log records in the output (based on the column’s value in the log record). If a filter excludes records based on a column’s value, the output still contains the specified column, only certain log records are missing. For more information, see Filter-predicate.

Option

Description

INCLUDE | EXCLUDE

Directs BMC AMI Log Master to generate output that includes or excludes certain columns. You cannot specify an include list and an exclude list for the same table.

Value

Description

INCLUDE

Directs BMC AMI Log Master to include only the column or columns specified by the COLUMNS keyword.

EXCLUDE

Directs BMC AMI Log Master to exclude the column or columns specified by the COLUMNS keyword. The output contains all of the original table columns except those in the exclude list.

TABLE owner.tableName

Specifies the table that contains the column or columns specified by the COLUMNS keyword. All of the columns in a single column list must be part of the same table. To specify columns from more than one table, you must specify multiple TABLE keywords.

To fully qualify a table, enter the owner of the table. If you do not specify an owner ID, BMC AMI Log Master uses a default value. The default value is the user ID of the batch job that runs BMC AMI Log Master. Separate the owner ID from the table name with a period.

COLUMNS (columnName)

Specifies the column or columns in a given table that BMC AMI Log Master includes in (or excludes from) the generated output. You can specify one or more columns in the table, separated by commas.

 

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