Second Replication from Same Source to Different Target DB
Problem Description
We have  a current replication  from SOURCEDB
 to TARGET1
 DB. Now we want to setup a second replication going from SOURCEDB
 to TARGET2
 database. How do we do this without messing up the first replication?
Solution
This can be done quite easily. The basic steps are:
Create a new directory for this replication configuration.
Make sure you DO NOT accept the default user,Â
dbvrep
, if you are using it for your original replication. The user MUST be different, for example:ÂdbvrepT2
. This way the metadata is kept separate from the other replication configuration.You will need to run replication on different ports than the first replication which defaults to 7901 & 7902. In this exampleÂ
7903
 &Â7904
 is used. You can choose whatever ports you want but ensure firewalls are opened for those ports in advance.
Steps Performed
Now for the actual steps shown in an example:
First create another directory. If the first replication is running out ofÂ
/u03/oracle/replicate/TARGET1
, create a new directory for the second replication on both the source server & target:Â/u03/oracle/replicate/TARGET2
You may need to open a second set of firewall ports for the second replication. As the original running replication is using 7901 & 7902, for this exercise we will use 7903 for MINE & 7904 for APPLY. Any port is fine as long as they are not used in the first replication.
Run setup wizard from the new directory you created:
$ cd /u03/oracle/replicate/TARGET2 $ dbvrep
When the setup wizard asks for the name of the replication it must be different from your running replication. This example usesÂ
TARGET2
.
Before starting the actual configuration, some basic information is needed. The DDC name and script path determines where all files created by the wizard go (and where to reread them from if the wizard is rerun). The license key determines which options are available for this configuration.
(DDC_NAME) - Please enter a name for this replication (suggestion: use the name of the source database): TARGET2
When prompted for the location of the configuration scripts, use the new source name (i.e. TARGET2
) so as not to overwrite the running replication directory:
Directory for location of configuration scripts on this machine: [/home/oracle/TARGET1] /u03/oracle/replicate/TARGET2
Note: The first step asks for a Dbvisit Replicate owner. This MUST be different from your running replication (i.e. TARGET1
) which is likely using the default dbvrep
 owner. For this example the user dbvrepDZ
 is used for the second replication owner.
Step 1: Describe Databases
Step 2 & Step 3 are same as usual...
Step 4: Process Configuration
Step 4 configures the replication processes for each replication. Note: although the hostname defaults are filled in, the default ports are shown. These need to be changed. The format is: hostname:port#. See the following responses to add the port numbers:
Complete all the instructions contained in Nextsteps.txt
 that follow. After running theÂ
all.sh
 script, the NextSteps.txt
 specifies the firewall ports that need to be open. This procedure is demonstrated in step 5.
Step 5
Ensure the firewall is listening on the interfaces used by the processes:Â
0.0.0.0:7904
 andÂ
0.0.0.0:7903
.
In the MINE.ddc
memory_set MINE.MINE_LISTEN_INTERFACE testhost210.dbvisit.co.nz:7903
In the APPLY.ddc
memory_set APPLY.APPLY_LISTEN_INTERFACE testhost211.dbvisit.co.nz:7904
Note: The script built to start the MINE & APPLY processes will now include the port#. For example:
You can also do one last check before running your APPLY.sh
 to instantiate the target. That is to verify the config settings reflect the ports for this instantiation:
Verify MINE will listen on the alternate port (i.e. 7903):
Verify APPLY will listen on the alternate port (i.e. 7904:
Verify no references to port 7901 or 7902 exist. The following commands should return nothing:
cd back to your working directory (/u03/oracle/replicate/TARGET2):
Complete your steps including (APPLY.sh
 / APPLY.bat
) as indicated in Nextsteps.txt
 to instantiate your target. You can startup MINE on the source server with the provided script while getting the target instantiated with data. For example:
Once instantiation is complete, start APPLY on the target host. For example:
Hope this helps.
Donna Zehl March 14, 2015 04:04