Configuring the Oracle Instance

Connect to the Oracle instance as a system administrator, using SQLPLUS,

  1. Prepare Oracle to use redo logs.

    To verify the archive log mode, enter:

    select log_mode from v$database; 

    If the archive log mode is on, you see:

    LOG_MODE
    -------
    ARCHIVELOG

    If the archive log mode is off,you see:

    shutdown immediate;exit

    Run the .sqlpus/nolog command to set the archive log mode to on, then enter:

    connect sys/password as sysdba;
    startup mount;
    alter database archivelog;
    alter database open;
    alter system set recyclebin=off;
  2. Enable supplemental logging for the source table:
    ALTER TABLE T1 ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
    Note:

    You must enable supplement logging for the source table.

  3. Add primary key information to the Oracle redo log:
    alter database add supplemental log data (primary key,
    unique index) columns;
    select SUPPLEMENTAL_LOG_DATA_MIN,
    SUPPLEMENTAL_LOG_DATA_PK, 
    SUPPLEMENTAL_LOG_DATA_UI from v$database;
    If the primary key information is successfully added, you see:
    SUPPLEME SUP SUP
    -------- --- ---
    YES      YES YES
  4. Create Oracle users for Replication Agent and Replication Server, and then provide permission to them:
    grant connect, resource,dba
    Note:

    Do not use the Oracle user for Replication Server to perform any DML transactions, as Replication Server does not capture data changes made by this user.