Test replication

This section describes the steps required to test replication.

StepsTo test replication

  1. Connect to the primary Oracle instance as a regular user.

  2. Create a test table to replicate (unless it already exists):

    create table T1( a int, b char(10));
    

    This statement is replicated by the user defined in the Mirror Replication Agent configuration parameter ddl_user. After the elapsed time referenced by the Mirror Replication Agent setting in scan_sleep_max, the T1 table should be replicated to the target Oracle instance.

  3. Grant permissions to any new or existing object to be replicated, so that the Replication Server maintenance user can update this table:

    grant all on T1 to public;
    

    This statement is also replicated to the standby database by the ddl_user defined in the Mirror Replication Agent configuration.

  4. After the table is marked and the Mirror Replication Agent is in a Replicating state, insert test data into the test table and commit it.

    By default, the work performed by the maintenance user of the primary connection will not be replicated. The user ID used to insert transactions cannot be the same as the maintenance user defined in the primary connection. See the section titled, “Configure Replication Server for replication from the primary database”.

    Mirror Replication Agent only applies committed transactions to a standby database. However, because Oracle expects a commit command to be issued, follow simple test commands with an explicit commit command:

    insert into T1 values ( 42, ‘foo’ ) ;commit;
    
  5. Using your preferred Oracle query tool, examine the standby site for results and compare the contents of your test table from both the primary and standby sites.

What to do if replication fails

If replication fails, refer to the Mirror Activator Administration Guide, in Chapter 2, “Troubleshooting Mirror Replication Agent,” the section titled, “Examining the Mirror Replication Agent when replication failure occurs.”