An example of Conflict Resolution Method
Here I am going to configure Oracle to use latest timestamp method to settle conflict ON SCOTT.EMP table’s EMPNO column.
Here I am going to configure Oracle to use latest timestamp method to settle conflict ON SCOTT.EMP table’s EMPNO column.
Problem
SQL> BEGIN
DBMS_REPCAT.ADD_MASTER_DATABASE (
gname => 'scott_repg',
master => 'repb',
use_existing_objects => TRUE,
copy_rows => TRUE,
propagation_mode => 'ASYNCHRONOUS');
END;
/
BEGIN
*
ERROR at line 1:
ORA-02055: distributed update operation failed; rollback required
ORA-00001: unique constraint (SYSTEM.REPCAT$_REPCAT_PRIMARY) violated
ORA-06512: at "SYS.DBMS_REPCAT_UTL", line 2649
ORA-06512: at "SYS.DBMS_REPCAT_RPC", line 313
ORA-06512: at "SYS.DBMS_REPCAT_MAS", line 223
ORA-06512: at "SYS.DBMS_REPCAT_MAS", line 2248
ORA-06512: at "SYS.DBMS_REPCAT", line 146
ORA-06512: at line 2
SQL> BEGIN
DBMS_REPCAT.RESUME_MASTER_ACTIVITY (
gname => ‘scott_repg’);
END;
BEGIN
*
ERROR at line 1:
ORA-23419: regenerate replication support before resuming master activity
ORA-06512: at “SYS.DBMS_SYS_ERROR”, line 79
ORA-06512: at “SYS.DBMS_REPCAT_MAS”, line 3528
ORA-06512: at “SYS.DBMS_REPCAT”, line 826
ORA-06512: at line 2
When you want to alter a table structure you should use QUIESCE the group and use following API to replicate DDL changes at all sites. Read more…
DBA_REPCATLOG describes the status for all asynchronous administrative requests and all error messages in the database.
What objects can we Replicate?
A replication object is a database object existing on multiple servers in a distributed database system.
Executed At: Master Definition Site
Replication Status: Quiesced
Step 1 Connect to the master definition site as the replication administrator.
Quiescing
Quiescing is the mode that transfers a replication environment from the normal mode to the quiesced mode. While a replication environment is quiescing, the user is no longer able to execute a transaction against a replicated object, but any existing deferred transactions are propagated. Queries against a quiescing table are allowed. When all deferred transactions have been successfully propagated to their respective destinations, the replication environment proceeds to the quiesced mode.
There are 2 ways to add a new master while the replication sites are suspended.
1. Adding Using ADD_MASTER_DATABASE Procedure
2. Adding with Offline Instantiation Using Export/Import
Delete all Errors from replication sites
Check if there are any errors "select * from deferror;"
I have a live 4 node 4 way cluster between repA,repAA,repB & repBB instances. The node repA is Master which I want to move to repAA.
Prerequisites for Advanced Replication
1. Must have distributed and replication option installed
Must run $ORACLE_HOME/rdbms/admin/catrep.sql as INTERNAL
Task: We have a working setup of 4 node 4 way replication cluster built on Advanced/MultiMaster replication. 2 nodes out of these 4 nodes should be moved to a different physical location without a downtime.