What is Supplemental Logging?
Redo log files are often used for instance recovery and media recovery. The data required for such operations is automatically recorded in redo log files. However, a redo-based application may require additional columns to be recorded in the redo log files. The process of recording these additional columns in the log files is called supplemental logging.
Oracle database does not provide any supplemental logging by default, which means LogMiner is not available by default. Therefore, you should enable at least minimal supplemental logging before creating log files to be analyzed by LogMiner.
The following are examples of when additional columns might be required:
- An application that applies refactored SQL statements to a different database (for example, Goldengate) should identify the update statement with a set of columns (for example, a primary key) that uniquely identifies the row, not with the ROWID shown in the refactored SQL returned by the V$LOGMNR_CONTENTS view, because the ROWID of one database will be different and therefore meaningless in another database.
- An application may require logging the previous view of the entire row, not just the changed columns, so that tracking row changes is more efficient.
A supplemental logging group is a set of additional columns that will be logged in redo log files when supplemental logging is enabled. There are two types of supplemental logging groups that determine when columns in the logging group will be logged:
- Unconditional supplemental log groups: Previous views of the specified columns are logged each time a row is updated, regardless of whether the update affects any of the specified columns.
- Conditional supplemental log groups: Previous images of all specified columns are logged only if at least one of the columns in the log group is updated.
Additional log groups can be system-generated or user-defined.
In addition to the two types of supplemental logging, there are two additional levels of logging:
- Supplemental Logging at database level
- Table level Supplemental Logging