Supplemental Logging
The Capture process captures this additional information and
places it in LCRs. Supplemental Logging is always configured at
a source database, regardless of location of the Capture process
that captures the changes that occur in the source database.
Even if the capture process is configured at the downstream
database, the source database needs to specify the Supplemental
Logging. In the case of Streams replication, the Apply process
uses the additional information in the LCRs to properly apply
DML changes and DDL changes that are replicated from a source
database to a destination database.
There are two types of supplemental log
groups: Unconditional Supplemental Log Groups and Conditional
Supplemental Log Groups.
-
Unconditional Supplemental Log Groups - The
before images of specified columns are logged any time a row is
updated, regardless of whether or not the update affected any of
the specified columns. This can be referred to as an ALWAYS log
group.
-
Conditional Supplemental Log Groups - The
before images of all specified columns are logged only if at
least one of the columns in the log group is updated.
Supplemental Logging can be enabled at
database level or at table level. Figure 3.3 shows the types of
Supplemental Logging options at the table level.
Figure 3.3 - Supplemental Logging
Options at the Table Level
Unconditional Supplemental Groups
To specify an unconditional supplemental
log group that only includes the primary key column(s) for a
table, use an ALTER TABLE statement with the PRIMARY KEY option
in the ADD SUPPLEMENTAL LOG DATA clause. The log group will have
a system-generated name. For example, to add the primary key
column of the NYDATA1.ALLINSURED table to an unconditional log
group, use the statement: