Step 1. Configure and verify the primary Oracle database for replication

Before you install MRO, you must configure the primary Oracle database for replication.

To ensure that Oracle redo log data is not overwritten before it is read by the MRO, you must complete the following tasks:

StepsVerify the current archiving setting of the redo logs

  1. Use SQLPLUS and connect to Oracle as a system administrator.

  2. Run the following command from SQLPLUS:

    select log_mode from v$database; 
    

For more information about Oracle redo logs and archiving, see the Mirror Activator for Oracle Administration Guide, Appendix C, “Mirror Replication Agent and Oracle Databases.”

StepsVerify the automatic archive setting

Archiving of redo logs must be enabled to prevent redo log data from being overwritten before it is archived. MRO will request Oracle to manually archive a redo log after the MRO has processed a redo log.

  1. Run the following command from SQLPLUS:

    show parameter log_archive_start;
    

For more information about Oracle redo logs and archiving, see the Mirror Activator for Oracle Administration Guide, Appendix C, “Mirror Replication Agent and Oracle Databases.”

StepsVerify the supplemental logging of primary key data

By default, Oracle does not log data from primary keys and unique indexes to the redo log output. You must include the logging of these values for a successful replication of all table values.

  1. Use SQLPLUS to connect to Oracle as a system administrator.

  2. Run the following command from SQLPLUS:

    SELECT SUPPLEMENTAL_LOG_DATA_PK, SUPPLEMENTAL_LOG_DATA_UI FROM V$DATABASE;
    

For more information about supplemental logging, see the Mirror Activator for Oracle Administration Guide, Appendix C, “Mirror Replication Agent and Oracle Databases.”

StepsTo create an Oracle user and grant permissions

An Oracle database user needs to be created for use by MRO when connected to the primary database.

NotePermission to grant access to objects owned by “SYS” may require the command to be executed by an Oracle user with sysdba privileges.

  1. From the following list of Oracle commands, create an Oracle user named “MRO_USER” with the password “sybase,” and grant permissions to the user.

    CREATE USER "MRO_USER" PROFILE "DEFAULT" IDENTIFIED BY "sybase" DEFAULT TABLESPACE "USERS" ACCOUNT UNLOCK;GRANT "CONNECT" TO "MRO_USER";GRANT "RESOURCE" TO "MRO_USER";GRANT "SELECT_CATALOG_ROLE" TO "MRO_USER";GRANT ALTER SESSION TO "MRO_USER"GRANT ALTER SYSTEM TO "MRO_USER"GRANT EXECUTE ON "SYS"."DBMS_FLASHBACK" TO "MRO_USER"GRANT ALTER ANY PROCEDURE TO "MRO_USER";
    
    GRANT CREATE SESSION TO "MRO_USER";GRANT CREATE TABLE TO "MRO_USER";GRANT CREATE PROCEDURE TO "MRO_USER";GRANT CREATE PUBLIC SYNONYM TO "MRO_USER";GRANT DROP PUBLIC SYNONYM TO "MRO_USER";GRANT SELECT ON SYS.OBJ$ TO "MRO_USER";GRANT SELECT ON SYS.LOB$ TO "MRO_USER";GRANT SELECT ON SYS.COLLECTION$ TO "MRO_USER";GRANT CREATE SEQUENCE TO "MRO_USER";GRANT SELECT ON SYS.CON$ TO "MRO_USER";GRANT SELECT ON SYS.COLTYPE$ TO "MRO_USER";
    
    GRANT SELECT ON SYS.COL$ TO "MRO_USER";
    
    GRANT SELECT ON SYS.CDEF$ TO "MRO_USER";GRANT SELECT ON SYS.USER$ TO "MRO_USER";GRANT SELECT ON SYS.SEQ$ TO "MRO_USER";
    
  2. To verify the individual table permissions, run the following command from SQLPLUS as the new Oracle user:

    SELECT TABLE_NAME,  PRIVILEGE FROM USER_TAB_PRIVS;TABLE_NAME                     PRIVILEGE------------------------------ ---------OBJ$                           SELECTUSER$                          SELECTCON$                           SELECTCDEF$                          SELECTSEQ$                           SELECTLOB$                           SELECTCOLTYPE$                       SELECTCOLLECTION$                    SELECTDBMS_FLASHBACK                 EXECUTE
    

Verify the Primary Oracle configuration for replication

As described in the previous section, the following Oracle commands can be issued to validate the required Oracle settings.

StepsVerify the current archiving setting of the archive log in an Oracle instance

  1. Run the following command from SQLPLUS:

    select log_mode from v$database;
    
  2. If the archive log is on, the result should be:

    LOG_MODE-------ARCHIVELOG
    

StepsVerify the roles of the Oracle user created for use by the MRO

  1. Using SQLPLUS, run the following command as the new Oracle user:

    select GRANTED_ROLE from USER_ROLE_PRIVS;GRANTED_ROLE--------------------CONNECTRESOURCESELECT_CATALOG_ROLE