MDC Switch – Configuring Multi-Data Center Types


This post discusses the steps required to configure a “master” data center to a “clone” data center and visa-versa.

If you are not familiar with Multi-Data Center (MDC) implementation and Automated Policy Synchronization (APS) please read the following links:


Use Case: Customer wants to convert an existing data center type from “master” to “clone” and the “clone” data center to a “master”.

One scenario for this use case is where the customer is adding a new data center and wants to designate the data center as the “master” and set the old “master” site as “clone”.  Other scenarios include configuring disaster recovery (DR) sites for example.



I like to automate things where applicable so after each step below I provide a simple bash script via gitlab link that you can use as a baseline for your environment. Scripting the process is helpful for quickly switching the data center type. There are some caveats that I will be discussing after each step as well.

NOTE: In order for the MDC switch to work, both the “master” and “clone” Weblogic Administration servers must be up and running.

The steps provided below was tested on Oracle Access Manager (OAM) version (PS3/BP03) and Weblogic 10.3.6.

  • Step 1) Disable/Delete existing APS agreement.

a) First get the list of agreements:

curl -k -u weblogic:Welcome1 ‘

b) Using the replication agreement ID above, disable the consumer agreement:

curl -u weblogic:Welcome1 -H ‘Content-Type: application/json’ -X PUT ‘’ -d ‘{“enabled”:”false”,”replicaType”:”CONSUMER”}’

c) Disable supplier

curl -u weblogic:Welcome1 -H ‘Content-Type: application/json’ -X PUT ‘’ -d ‘{“enabled”:”false”,”replicaType”:”SUPPLIER”}’

d) Delete both the consumer and supplier agreements

curl -u weblogic:Welcome1 -H ‘Content-Type: application/json’ -X DELETE ‘’

Here is a link to the script:

First notice that the curl command requires a user name and password. The user here must be part of the ‘system store’. By default the system store is WebLogic embedded LDAP. For a better understanding check out this link:

Now if you changed the system store after the replication agreement was created you may have issues removing the agreement. You have two options here; one you can revert the system store configuration and try the script again or you can delete the replication agreement directly from the Database.

Below is a screen shot of SQL Developer that shows the value of the replication agreement in the database. From SQL Developer you can delete the replication agreement. Make sure that you remove both entries from the master and clone database. The replication agreement can be found under the AM_REPLICATION_SETTINGS table.


OEL6.6 DC1 (APS working with PS3 base and external LDAP) [Running] - Oracle VM VirtualBox_034

  • Step 2) Modify Clone DC

Run wlst script:

connect() (enter parameters to connect)


a) Set write enabled flag to ‘true’


b) Set to data center to “master”


  • Step 3) Modify Master DC

Run wlst script:

connect() (enter parameters to connect)


a) Set data center type to clone


b) Set write enabled flag to ‘false’


Here is a link to the script:


  • Step 4) Setup a new replication agreement

a) Make sure replication is enabled

curl -u weblogic:Welcome1 ‘’

b) Create the agreement and note the agreement ID

Make sure the host is pointing to the new master site (dc2)

curl -u weblogic:Welcome1 -H ‘Content-Type: application/json’ -X POST ‘’ -d  ‘{“name”:”DC22DC1″, “source”:”dc2East”,”target”:”dc1West”,”documentType”:”ENTITY”}’


c) Shorten the poll interval for testing purposes

curl -u weblogic:Welcome1 -H ‘Content-Type: application/json’  -X PUT ‘′ -d ‘{“pollInterval”:”60″,”replicaType”:”consumer”}’

Here is the link to the script:

Once this step is complete, you will need to restart the clone admin and managed srevers as per the documentation:

Once replication agreement is created successfully, the clone/consumer will start polling for changes from next restart of clone AdminServer onwards. The default poll interval for changes is ‘900’ seconds or 15 mins. The poll interval can be changed by executing an edit replication agreement command.


Add Your Comment