Salesforce

An example of how to set up an OpenEdge Replication testing configuration for replication sets

« Go Back

Information

 
TitleAn example of how to set up an OpenEdge Replication testing configuration for replication sets
URL NameAn-example-of-how-to-set-up-an-OpenEdge-Replication-testing-configuration-for-replication-sets
Article Number000116311
EnvironmentProduct: OpenEdge
Version: 11.7
OS: All supported platforms
Other: OpenEdge Replication
Question/Problem Description
An example of how to set up an OpenEdge Replication testing configuration for replication sets
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
The following setup was carried out on Linux using OE 11.7.2, running a separate proenv session for each database.

Initial configuration

1.
mkdir ReplTest
mkdir ReplTest/sourceDB
mkdir ReplTest/targetDB1
mkdir ReplTest/targetDB2
mkdir ReplTest/sourceDB/backups
mkdir ReplTest/sourceDB/aiArchives
mkdir ReplTest/targetDB1/backups
mkdir ReplTest/targetDB1/aiArchives
mkdir ReplTest/targetDB2/backups
mkdir ReplTest/targetDB2/aiArchives



2.
cd ReplTest/sourceDB
cd ReplTest/targetDB1
cd ReplTest/targetDB2



3. Create this st for each of the databases, variously renamed as sourceDB.st, targetDB1.st, targetDB2.st, and locate them into their respective directories.

#
b .
#
d "Schema Area":6,32;1 .
#
d "Employee":7,32;1 . f 320
d "Employee":7,32;1 .
#
d "Inventory":8,32;1 . f 640
d "Inventory":8,32;1 .
#
d "Cust_Data":9,32;1 . f 320
d "Cust_Data":9,32;1 .
#
d "Cust_Index":10,32;1 . f 320
d "Cust_Index":10,32;1 .
#
d "Order":11,32;1 . f 1280
d "Order":11,32;1 .
#
d "Misc":12,32;1 . f 320
d "Misc":12,32;1 .
#
a .
a .
a .
a .
a .



4. Set up sourceDB in ReplTest/sourceDB:

prodb sourceDB sports2000
probkup sourceDB backups/sourceDB_BAK00
rfutil sourceDB -C aimage begin
rfutil sourceDB -C aiarchiver enable
proutil sourceDB -C enableSiteReplication source
probkup sourceDB incremental backups/sourceDB_BAK00incr



5. Set up targetDB1 in ReplTest/targetDB1:

prorest targetDB1 ../sourceDB/backups/sourceDB_BAK00
prorest targetDB1 ../sourceDB/backups/sourceDB_BAK00incr
rfutil targetDB1 -C aimage begin
rfutil targetDB1 -C aiarchiver enable
proutil targetDB1 -C enableSiteReplication target



6. Set up targetDB2 in ReplTest/targetDB2:

prorest targetDB2 ../sourceDB/backups/sourceDB_BAK00
prorest targetDB2 ../sourceDB/backups/sourceDB_BAK00incr
rfutil targetDB2 -C aimage begin
rfutil targetDB2 -C aiarchiver enable
proutil targetDB2 -C enableSiteReplication target



7. Copy the relevant repl.properties file (attached to article as replprops.zip) into the respective directories.
Ensure that hostnames, ports etc. are correct for your environment.


8. Start databases - they should all come up and sync.

proserve targetDB1 -DBService replagent -S 20001 -aiarcdir aiArchives
proserve targetDB2 -DBService replagent -S 20002 -aiarcdir aiArchives
proserve sourceDB -DBService replserv -S 20000 -aiarcdir aiArchives



9.

proshut sourceDB -by
proshut targetDB1 -by
proshut targetDB2 -by



10. That startup and shutdown should show the validity of the whole configuration, and that up till here replication functions correctly. At this point the whole dir structure should be backed up, to speed up later testing.


Transitioning databases


1. Start the databases -

proserve targetDB1 -DBService replagent -S 20001 -aiarcdir aiArchives
proserve targetDB2 -DBService replagent -S 20002 -aiarcdir aiArchives
proserve sourceDB -DBService replserv -S 20000 -aiarcdir aiArchives



2. dsrutil sourceDB -C transition failover


sourceDB successfully transitions to being a target. targetDB1 is now source database for sourceDB and targetDB2. sourceDB can now be shut down as reqd, and the maintenance carried out on the original source machine.


3. proshut sourceDB -by


targetDB1 stays up as source and can continue replicating to targetDB2.


Now to prepare to failback from targetDB1 to sourceDB.



4. Edit the targetDB1.repl.properties file. Under [transition]: 

transition-to-agents=agent0


5. Restart sourceDB. It must be restarted as a target database:

proserve sourceDB -DBService replagent -S 20000 -aiarcdir aiArchives


6. Terminate and restart the repl server on targetDB1 to make it read the new transition-to-agents property value from (4):

dsrutil targetDB1 -C terminate server
dsrutil targetDB1 -C restart server

Current source (targetDB1) should resync with targets (sourceDB, targetDB2).


7. Initiate failover transition from targetDB1 back to sourceDB:


dsrutil targetDB1 -C transition failover

The sourceDB database is now the replication source again.


8. Edit the targetDB1.repl.properties file to change the properties back to a configuration for recovery transition, i.e. under [transition]:


transition-to-agents=agent1,agent2


9. Terminate and restart replication to bring those new settings into effect:

dsrutil sourceDB -C terminate server
dsrutil targetDB1 -C terminate agent
dsrutil targetDB2 -C terminate agent

dsrutil targetDB1 -C restart agent
dsrutil targetDB2 -C restart agent
dsrutil sourceDB -C restart server


 
Workaround
Notes
Keyword Phrase
Last Modified Date3/27/2018 6:58 PM

Powered by