OpenEdge Replication Setup

This is a step by step guide on OpenEdge Replication setup with 2 nodes.
Here I ll be setting up replication for Openedge 10.2B databases on RHEL 6.2 on top of Virtualbox.
My replication environment will be configured for automatic transition, (DR conversion to primary)
and will be using Defer Agent Startup (DR database can be created while production is running - minimum production timeout) method.

With OpenEdge DR option comes as a separate installable add-on products for database.
It has two variants.
1. OpenEdge Replication.
2. OpenEdge Replication Plus. (Provides the possibility to perform read-only actions on DR DB)

Virtualbox Setup


Install OS (Mine - RHEL 6.2) and  Progress Openedge database (Mine -OpenEdge Enterprise DB 10.2B) and the Fathom replication product (Mine - OpenEdge Replication plus).
After installation check with ‘showcfg’ on proenv prompt, should display both the products.

Clone or manually create another duplicate server. 

Make sure to configure network connectivity between two machines. Use different host names. In this example my primary would be "repi1 - 192.168.56.2" and secondary is "repl2 - 192.168.56.3".

OpenEdge Database and Replication Setup


On primary server,

1. Create the DB.

I ll be using the sample sports2000 db bundled with the installation.
So i will copy spotrs2000 db from DLC (mine - /usr/dlc) to /db/ location of my server. This will be my primary server.

cp /usr/dlc/sports2000* /db/

2. Enable after imaging.

After imaging (or Redo) need to be enabled on primary server. As most other DR solutions this is also based on log shipping to DR location.

So any committed transaction will generate  After Imaging logs which will be transferred to DR server and applied (Roll-forwarded) on Secondary database.

To enabled replication, first it is required to define files (extents) to store these information.
So we will create a .st file sports2000_ai.st as below, and add it to the database.

a         /db/sports2000.a1 f 5120
a         /db/sports2000.a2 f 5120
a          /db/sports2000.a3 

prostrct add /db/sports2000 /db/sports2000_ai.st

Then mark the database as backedup before enabling AI.

rfutil /db/sports2000 –C mark backedup

Enable AI for the database.

rfutil /db/sports2000 –C aimage begin

3. Enable primary database for the Source replication.

proutil /db/sports2000 –C enableSiteReplication source

4. Configure replication properties.

All the replication properties are configured in file which uses the name conversion <dbname>.repl.properties. This file should be there on the database location. I ll be using the file attached below which is named as sports2000.repl.properties abd stored in /db/.


In this example my replication will be Asynchronous, Auto transition enabled, Using Defer Agent and with Single DR (It is possible to have max of two DR destinations) destination.
I will not include the description of each of the properties here as they are clearly explained in the online documentation.

5. Enable source replicaiton for primary DB.

proutil sports2000 –C enableSiteReplication source

Replication "source" here indicate that this primary database will be operating as replication source, and it will send the generated log files to DR side.

6. Start the database as replication enabled source database.

Now it is possible to start this database as replication source database.

proserve -db sports2000  -DBService replserv -H repl1 -N tcp -S 2222 -aistall

-DBService replserv indicates that this database is a replication source.
-aistall will keep the database on start when AI storage limit is reached until DBA intervention.

7. Take an online backup to create the target database.

probkup online /db/sports2000 /db/sports2000_backup.bak –REPLTargetCreation

-REPLTargetCreation option specify that this backup will be used to create DR database.

Move this backup to the server repl2.

On DR server,

1. Restore backup created on Step 7 above

I ll be restoring to different path and different database name, but most production environments tend to use identical servers because that can be helpful in client connection fail-overs.
Database path on DR server - /inst
Database name on DR server - targetdb

prorest -db targetdb  -DBService replserv -H repl1

2. include the property file for DR database

As in the primary site create property file named targetdb.repl.properties in /inst location.
Attached below is the file used in this example setup.


3. Enable replicaiton for the database

proutil targetdb –C enableSiteReplication target

Enabling replication "target" indicates that this database will be replicated from a source database AI logs.

4. Start the target database

proserve –db  targetdb  –DBService  replagent –H repl2 –N tcp –S 4501

-DBService replagent indicates that this database is enabled for target replication and it will start an agent to manage the replication.

This concludes the second post of DR series which includes the setup of DR enabled database environment using OE replication for testing the failure conditions which will be discussed later.

Next - High Availability Series: Part 3 - Oracle DataGuard Settup


Comments

Post a Comment

Popular posts from this blog

ORA-16433: The database or pluggable database must be opened in read/write

Oracle Multitenant - Create new service for PDB using DBMS_SERVICE

Wait for unread message on broadcast channel - Blocking Sessions