Limiting the Redo Logs From Which Express CDC Reads Changes
Limiting the Redo Logs From Which Express CDC Reads Changes
In the READER statement of the PowerExchange Express CDC configuration file, you can specify parameters that limit the archived log destinations and the active redo logs from which the Express CDC log reader reads change records. Express CDC uses these parameters to build a list of the redo logs to read.
For archived logs, Express CDC attempts to identify a primary copy and a secondary copy of each log that it must read. Express CDC identifies the primary and secondary archived log destinations based on the order of the archive destination numbers, where an archive destination number is the
n
value in an Oracle LOG_ARCHIVE_DEST_
n
parameter. The primary destination is the destination that 1) contains available logs that are suitable for PowerExchange use and 2) has the lower
n
value compared to any other destination with available archived logs. You can override this behavior by specifying the ARCHIVEDEST1 and ARCHIVEDEST2 parameters in the READER statement of the Express CDC configuration file.
If you specify MODE=ACTIVE in the READER statement, you can use any of the following optional parameters to filter active redo logs or archived log destinations:
ACTIVELOGMASK=
mask
Specifies a mask for selecting active redo logs for the PowerExchange Express CDC log reader when the Oracle instance uses multiplexing of redo logs. The log reader compares the mask against the member names in an active redo log group to determine which log to read. In the mask, you can use the asterisk (*) wildcard to represent zero or more characters.
ARCHIVEDEST1=
n
If you create more than one copy of each archived log, use this parameter to indicate the primary log destination from which Express CDC reads archived logs. This parameter specifies a number that corresponds to the
n
value in an Oracle LOG_ARCHIVE_DEST_
n
initialization parameter.
ARCHIVEDEST2=
n
If you create more than one copy of each archived log, use the ARCHIVEDEST2 parameter to indicate the secondary log destination from which Express CDC reads archived logs when the archived logs cannot be read from the primary ARCHIVEDEST1 destination. This parameter specifies a number that corresponds to the
n
value in an Oracle LOG_ARCHIVE_DEST_
n
initialization parameter.
If you specify MODE=ARCHIVEONLY in the READER statement, you can use the ARCHIVEDEST1 parameter, ARCHIVEDEST2 parameter, or both of these parameters to filter archived log destinations.
In both ACTIVE and ARCHIVEONLY modes, Express CDC uses the ARCHIVEDEST1 and ARCHIVEDEST2 parameters to filter archived log destinations as follows:
If you specify only the ARCHIVEDEST1 parameter, Express CDC uses only the log destination that is specified in the LOG_ARCHIVE_DEST_
n
parameter to which the ARCHIVEDEST1 parameter points. For example, if ARCHIVEDEST1=2, Express CDC uses the log destination specified in the LOG_ARCHIVE_DEST_2 parameter.
If you specify only the ARCHIVEDEST2 parameter, Express CDC uses only the log destination that is specified in the LOG_ARCHIVE_DEST_
n
parameter to which the ARCHIVEDEST2 parameter points. For example, if ARCHIVEDEST2=4, Express CDC uses the log destination specified in the LOG_ARCHIVE_DEST_4 parameter.
If you specify both the ARCHIVEDEST1 and ARCHIVEDEST2 parameters, Express CDC first attempts to use the ARCHIVEDEST1 log destination. If the log reader cannot read the archived logs from this destination, then Express CDC attempts to use the ARCHIVEDEST2 log destination. For example, if ARCHIVEDEST1=2 and ARCHIVEDEST2=4, Express CDC first attempts to read the archived logs in the log destination that is specified in the LOG_ARCHIVE_DEST_2 parameter. If Express CDC cannot read the logs in this primary destination, it attempts to read the logs in the secondary destination that is specified in the LOG_ARCHIVE_DEST_4 parameter.
If you specify neither the ARCHIVEDEST1 nor ARCHIVEDEST2 parameter, Express CDC does not filter the archived log query by destination.
Specifying only ARCHIVEDEST1 or only ARCHIVEDEST2 limits the resilience of the Express CDC log reader because the log reader then processes logs from only one archive log destination.
If you specify MODE=ARCHIVECOPY in the READER statement, the PowerExchange Express CDC log reader reads copies of the archived redo logs that are located on a file system. You must specify the DIR parameter to identify the base directory that includes the copies of the archived redo logs. To filter the subdirectories under the base directory that the log reader scans and the copies of the archived log files in these subdirectories, also specify the FILE parameter with masks for the subdirectory names, log file names, or both.