Enterprisedb (EDB-XDB) Replication Tool Installation & Configuration

xDB Replication Server can be used to implement replication systems based on either of two different 

replication models –single-primary(primary-to-secondary) replication or multi-primaryreplication.

xDB Replication Server supports for single-primary replication:

  • From Oracle to PostgreSQL
  • From Oracle to Advanced Server
  • From SQL Server to PostgreSQL
  • From SQL Server to Advanced Server
  • From Advanced Server to Oracle
  • From PostgreSQL to SQL Server
  • From Advanced Server to SQL Server
  • Between PostgreSQL and Advanced Server

xDB Replication Server supports for multi-primaryreplication:

  • Between PostgreSQL database servers
  • Between PostgreSQL database servers and Advanced Servers in PostgreSQL compatible   mode
  • Between Advanced Servers in PostgreSQL compatible mode
  • Between Advanced Servers in Oracle compatible mode

The following are the database product versions that may be used with xDB Replication Server.

  • PostgreSQL versions 9.2, 9.3, 9.4, 9.5, 9.6, 10, 11, and 12
  • Advanced Server versions 9.2, 9.3, 9.4, 9.5, 9.6, 10, 11, and 12
  • Oracle 10g Release 2 version 10.2.0.1.0 has been explicitly certified. Newer minor versions in the 10.2 line are supported as well.
  • Oracle 11g Release 2 version 11.2.0.2.0 has been explicitly certified. Newer minor versions in the 11.2 line are supported as well.
  • Oracle 12c version 12.1.0.2.0 has been explicitly certified. Newer minor versions in the 12.1 line are supported as well.
  • SQL Server 2008 version 10.50.1617.0 has been explicitly certified. Newer minor versions in the 10.50 line are supported as well.
  • SQL Server 2012 version 11.0.6020.0 has been explicitly certified. Newer minor versions in the 11.0 line are supported as well.
  • SQL Server 2014 version 12.0.5000.0 has been explicitly certified. Newer minor versions in the 12.0 line are supported as well.

Replication Concepts and Definitions:

xDB Replication Server is a software product that enables the implementation of a replication system. A replication system is software and hardware whose purpose is to make a copy of data from one location to another and to ensure the copied data is the same as the original over time.

xDB Replication Server applies the replication system concept to tables of Oracle, SQL Server, PostgreSQL, and Advanced Server database management systems.

Comparison of Single-Primary and Multi-Primary Replication:

Single-Primary Replication (SPR)

                 Changes (inserts, updates, and deletions) to table rows are allowed to occur in a designated primary database. These changes are replicated to tables in one or more secondary databases. 

                 The replicated tables in the secondary databases are not permitted to accept any changes except from its designated primary database. (This is also known as primary-to-secondary replication.)

Multi-Primary Replication (MPR). 

                  Two or more databases are designated in which tables with the same table definitions and initial row sets are created. Changes (inserts, updates, and deletions) to table rows are allowed to occur in any database. Changes to table rows in any given database are replicated to their counterpart tables in every other database.

For a single-primary replication system, a variety of configurations are supported including:

  • Replication between PostgreSQL and Advanced Server databases (between products in either direction)
  • Replication from Oracle to PostgreSQL
  • Replication in either direction between Oracle and Advanced Server
  • Replication in either direction between SQL Server and PostgreSQL
  • Replication in either direction between SQL Server and Advanced Server

For multi-primary replication, the participating database servers in a given multi-primary replication system must be of the same type:

  • PostgreSQL database servers
  • PostgreSQL database servers and Advanced Servers operating in PostgreSQL compatible mode
  • Advanced Servers operating in PostgreSQL compatible mode
  • Advanced Servers operating in Oracle compatible mode

Snapshot and Synchronization Overview:

xDB Replication Server performs two different types of replications. These two main types are called snapshot replication and synchronization replication.

snapshot replication, all existing rows in the target tables are deleted using the database system’s TRUNCATE command. 

The tables are then completely reloaded from the source tables of the publication.

synchronization replication, only the changes (inserts, updates, and deletions) to the rows in 

the source tables since the last replication are applied to the target tables.

How to Download XDB Replication Tool:

1.goto https://www.enterprisedb.com/ and click Downloads 

2.click Replication server next click os you are get xdbreplicationserver-6.2.10-1-linux-x64.run

Installation:

[root@server1 tools]# ./xdbreplicationserver-6.2.10-1-linux-x64.run //open gui mode

  • Choose language clock ok button.
  • Accept the agreement and click next button.
  • Choose installation directory and click next button.
  • Select the all components(replication console,publication server,subscription server) and click next button.
  • Type admin user username,password and click next button.
  • Type publication server port number(Example: port 9051) and click next button.
  • Type subscription server port number(Example: port 9052) and click next button.
  • Type os username and click next button after installation complete click finish button.

XDB Replication Tool bin path:

/opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/bin/

XDB Replication Tool ojdbc file path:

/opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/lib/jdbc/

Run XDB Replication Tool:

1.Click Applications Menu for linux os

2.Choose Postgres Plus Add-ons and click xDB Replication Console

Open GUI Mode:

1.Right click Replication server and click Register Publication Server

2.enter publication server Host,port,username,password and click Register button

Example:

3.Right Click SMR and click add Database

4.Select Publication database type and type server information.

Example:

5.Right click pubserver db and click create Publication

Example:

Type publication name and select Publication table(must Primary key Tables)

 Example:

6.Right Click Replication Servers and click Register Subscription Server

7.enter Subscription server Host,port,username,password and click Register button

Example:

8.Right click Subscription server and click add database

Example:

9.Right click subscription db and click Create Subscription

Type subscription name , publication server information and click create button

Example:

10:Right Click subscription name(sub) and click snapshot

Example:

11.click Snapshot button

Example:

Configure Schedule Replication:

Right click subscription name (sub) and click Configure Schedule option

choose type of task (example: Synchronize) and choose perform this task(example: Continously)

and click next button and type seconds 

Example:

Select repeat interval (in seconds) for this task 10 

click next button and click finish button


Comments