The processes of replication your database with OpenEdge is dynamic in nature. There are many ways in which you can choose to replicate your database. This is by design to accommodate as many enterprises as possible. However, this quick start guide focuses on a specific predetermined path to showcase an example of replication and database high availability.

Choosing the replication agent startup mode

Whether you are implementing a Replication Set or single-target replication, you can choose between two startup modes for the replication agent—deferred agent startup and immediate agent startup. This guide uses deferred agent startup.
Note: Deferred agent startup requires asynchronous replication.

Deferred agent startup mode—The deferred agent startup mode enables the Source and its replication server to start without connecting to the replication agents, provided you have implemented asynchronous replication. This mode is useful if you want to create your Targets from an online backup of the Source. This guide uses the deferred agent startup mode.

Once replication starts:
  1. If the replication server cannot connect to its agents on the first attempt, the server will go into the deferred agent startup mode, allowing Source database activities.
  2. While in the deferred agent startup mode, the replication server makes a connection attempt every five minutes until the agents are connected or the mode is timed out.
  3. When the server is connected to the agents, initialization and synchronization take place. Source database activity is paused until synchronization is complete.

Immediate agent startup mode—The immediate agent startup mode, on the other hand, does not allow any Source or Target activity until the replication server and agents complete their startup and initialization activities. To configure this mode, you must configure synchronous replication.

Because deferred agent startup allows for online backups and minimizes downtime, it is the recommended mode for starting your replication agents.

Choose an online or an offline backup of the source database

As you plan for OpenEdge Replication, you identify the database you will use as a source. You then use a backup of that database to create the target database.

You can choose to use either an online backup or an offline backup of the source to create the target database. The steps you follow to set up the source database and enable it for replication are, however, dependent upon the backup method that you choose.

This guide uses an online database backup because it reduces downtime and brings the database closer to high availability. Online database back up is discussed in more detail later in this guide.

Asynchronous replication method

Data can be replicated from the Source to the Targets asynchronously. In asynchronous replication the replication server keeps sending AI blocks to the replication agent as updates are made to the Source. Thus, there is no wait time between the end of one transaction and the beginning of another.

Versions of OpenEdge prior to 12.0 could use synchronous or asynchronous replication. However, synchronous replication is much slower than asynchronous replication. For this reason, asynchronous replication is the recommended replication method for OpenEdge versions prior to 12.0.

Choose transition properties

Finally, you need to make decisions about the following aspects of transition:
  • In a Replication Set, which Target is primary and which is secondary?
  • Which type of AI functionality should be implemented in the Targets?
  • Should the Targets restart automatically after transition?
  • What should be the Target behavior in the case of the loss of a Source?
  • Should the transition be initiated manually or automatically?

The first three decisions apply to both planned downtime and the loss of a Source. The last two decisions only apply to the loss of a Source.

When you set the properties in the properties file, you configure how you want the entire replication framework to perform before, during, and after transition.

The following is an example of transition properties.
replication-set=1
database-role=reverse
transition-to-agents=agent1, agent2
auto-begin-ai=1
auto-add-ai-areas=0
ai-structure-file=addAI.st
recovery-backup-arguments=backup-db0-recovery.bak
restart-after-transition=1
source-startup-arguments=-pf sourcestart-args.pf -S 20000
target-startup-arguments=-pf targetstart-args.pf -S 20000
The following table provides a summary of the transition properties. The table lists each property in the repl.properties file, identifies the property type, and provides a property description.
Table 1. Transition properties
Property name Type and length Description
replication-set integer Defines if source and target replicas transition together. Possible values are as follows:
  • 0 — The source and targets do not transition together (the default).
  • 1 — The source and targets transition together.

For more information, see Transition of a Replication Set in Use Database Replication.

database-role character[15] The new role of the database once it is transitioned. The possible values for this property are as follows:
  • reverse — The role of the database is reversed: A source database becomes a target database, and a target database becomes a source database.
  • normal — The role of the database becomes that of a normal database; the database is no longer enabled for replication once the transition is performed. This is the default value.
responsibility character[15] This property must contain one of the following values:
  • primary — This database is the primary database.
  • secondary — This database is the secondary database.
This property is currently informational.
restart-after-transition integer The database can be automatically restarted after transition is performed.

Valid values for the property are 0 and 1. When the property is set to 1, the following *-startup-arguments properties must be supplied, or the database startup will fail:

  • If the database role is normal, you must specify the normal-startup-arguments.
  • If the database role is reversed, you must specify the source-startup-arguments and the target-startup-arguments.
Note: The restart-after-transition property behaves differently during online transition. Setting the property value to 1 does not automatically restart the database. The value is ignored. For more information, see Plan for transition in Use Database Replication.
start-secondary-broker integer Set to 1 to automatically start a secondary broker after transition.
source-startup-arguments character[256] If the database is transitioned to a source database, these arguments are used when the database is started. The arguments will be appended to the PROSERVE command (used to start the database). In most cases, the only argument specified here should be -pf followed by a parameter file name. For example:-pf db-name.source.pf
target-startup-arguments character[256] If the database is transitioned to a target database, these arguments are used when the database is started. The arguments will be appended to the PROSERVE command.

In most cases, the only argument specified here should be -pf followed by a parameter file name. For example:

-pf db-name.target.pf

Because the database is a target, you must also specify the following arguments as an indication to the broker to listen on the TCP/IP port specified with -S port-number or service-name:

-S { port-number|service-name}

normal-startup-arguments character[256] If the database is transitioned to a normal database, these arguments are used when the database is started. The arguments will be appended to the PROSERVE command.

In most cases, the only argument specified here should be -pf followed by a parameter file name. For example:

-pf db-name.normal.pf

source-secondary-broker- startup-arguments character[256] For secondary broker. See the description of source-startup-arguments for details.
target-secondary-broker- startup-arguments character[256] For secondary broker. See the description of target-startup-arguments for details.
normal-secondary-broker- startup-arguments character[256] For secondary broker. See the description of normal-startup-arguments for details.
auto-begin-ai integer Specify 1 to automatically begin AI after a target-to-source database transition. After-imaging can be started for a database that has AI areas.
transition-to-agents character[256] Transition to the first agent in the list when a failure occurs. If the first agent is not available, transition to the second agent in the list.

If replication-set=1, the first agent in the transition-to-agents list is selected to become the new source.

A valid value for this property is any configured agent name; separate the names by a comma if you are listing more than one. For example:

agent1,agent2

Note: If both dr-transition-to-agents and transition-to-agents are defined, dr-transition-to-agents is used in recovery transition and transition-to-agents is used for failover transition. If dr-transition-to-agents is not defined,transition-to-agents is used for both types of recovery.
dr-transition-to-agents character[256] For Recovery Transition only.Transition to the first agent in the list when a failure occurs. If the first agent is not available, transition to the second agent in the list.

If replication-set=1, the first agent in the transition-to-agents list is selected to become the new source.

A valid value for this property is any configured agent name; separate the names by a comma if you are listing more than one. For example:

agent1,agent2

Note: If both dr-transition-to-agents and transition-to-agents are defined, dr-transition-to-agents is used in recovery transition and transition-to-agents is used for failover transition. If dr-transition-to-agents is not defined,transition-to-agents is used for both types of recovery.
auto-add-ai-areas integer This property instructs the transition process to automatically add AI areas to the database if:
  • It is transitioned to a source database.
  • There are currently no AI areas for the database.
If the value specified for the property is 0, AI areas are not added to the database. If the value specified is 1, AI areas are automatically added to the database by using the structure file specified in the ai-structure-file property.
ai-structure-file character[256] Name of the structure file that contains the list of AI areas to add.
backup-method character[15] Specifies the backup method performed before AI is enabled. The following values are valid:
  • mark — Mark the database backed up by using the following command:

    rfutil db-name -C mark backedup

    Marking the database as backed up does not allow future AI extents to be used when recovering from a disaster.

  • full-offline — The database will be backed up offline by using the PROBKUP utility.

    The backup is performed in two steps: The first backup is a full backup, which is performed before AI is enabled for the database. The second backup is an incremental backup, which is performed after AI is enabled and after the role of the database is changed.

  • full-online — An online backup is performed after the database is restarted, which occurs after the database has been transitioned.
Note: The backup-method property behaves differently during online transition. For more information, see Failover transition and offline backup in Use Database Replication.
backup-arguments character[256] The arguments required for the full online and offline backups that are performed for the database.

At a minimum, the target file or device must be specified in these arguments for both online and offline backups. To avoid overwriting a backup, do not use the same target file or device for both the backup and the incremental backup.

Do not use backup validation parameters (such as -vp and -vf).

The arguments should begin with device-name.

incremental-backup- arguments character[256] The arguments required for the offline incremental backup performed after AI is enabled and the database's role is reversed.

The arguments should begin with device-name.

recovery-backup- arguments character[256] The arguments required for the full online and offline backups that are performed for the database.

At a minimum, the target file or device must be specified in these arguments for both online and offline backups. To avoid overwriting a backup, do not use the same target file or device for both the backup and the incremental backup.

Do not use backup validation parameters (such as -vp and -vf).

The arguments should begin with device-name.

apply-streaming-data integer For auto-transition only. If Replication AI Streaming is enabled, and there is data in the RSB cache at the time of transition, indicate if the data should be applied or ignored before transition. The following values are valid:
  • 1 — Apply all data in the RSB cache before transition.
  • 0 — Do not apply any data in the RSB cache before transition.
Note: Replication AI Streaming is enabled by default.