Category - GOLDENGATE

Supplemental Logging

Database-Level Supplemental Logging

=> There are two types of database-level supplemental logging:
   1-> minimal supplemental logging and 
   2-> identification key logging.
   
=> Minimal Supplemental Logging

    Minimal supplemental logging logs the minimal amount of information needed for LogMiner to identify,group, and merge the redo operations
    associated with DML changes. It ensures that LogMiner (and any product building on LogMiner technology) has sufficient information to 
    support chained rows and various storage arrangements, such as cluster tables and index-organized tables. 
    To enable minimal supplemental logging, execute the following SQL statement:

    ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;


=> Database-Level Identification Key Logging

    Identification key logging is necessary when redo log files will not be mined at the source database instance, for example, 
    when the redo log files will be mined at a logical standby database.
    
    There are 4 OPTIONS to enable Identification Key Logging
    
A=> ALL system-generated unconditional supplemental log group
    SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
    
    This option specifies that when a row is updated, all columns of that row (except for LOBs, LONGS, and ADTs) 
    are placed in the redo log file.
  
B=> PRIMARY KEY system-generated unconditional supplemental log group
    SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
    
    This option causes the database to place all columns of a row's primary key in the redo log file whenever a row containing a 
    primary key is updated (even if no value in the primary key has changed).
    
C=> UNIQUE system-generated conditional supplemental log group
    SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (UNIQUE) COLUMNS;
    
D=> FOREIGN KEY system-generated conditional supplemental log group
    SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (FOREIGN KEY) COLUMNS;