Verifying the Supplemental Logging of Primary Key Data

Verify that Oracle logs the values of the primary keys and unique indexes.

By default, Oracle does not log primary keys and unique indexes. For successful replication of all table values, you must log these values.

  1. Use SQLPLUS to connect to Oracle as a system administrator:
    SELECT SUPPLEMENTAL_LOG_DATA_MIN,
    SUPPLEMENTAL_LOG_DATA_PK,
    SUPPLEMENTAL_LOG_DATA_UI
    FROM V$DATABASE;
    If logging of primary key and unique index values is enabled, the return values are:
    SUP SUP SUP
    --- --- ---
    YES YES YES
  2. If the result is different, turn on supplemental logging by executing:
    ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY
    KEY, UNIQUE INDEX) COLUMNS;
    ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;