Chat now with support
Chat with Support

SharePlex 8.6.6 - Administration Guide

About this Guide Conventions used in this guide Overview of SharePlex Run SharePlex Run multiple instances of SharePlex Execute commands in sp_ctrl SharePlex parameters Prepare an Oracle environment for replication Create a configuration file Configure replication to Open Target targets Configure a replication strategy Configure partitioned replication Configure named queues Configure SharePlex to maintain a change history target Replicate Oracle DDL Set up error handling Transform data Configure SharePlex security features Activate replication in your production environment Monitor SharePlex Prevent and solve replication problems Repair out-of-sync Data Procedures to maintain Oracle high availability Make changes to an active replication environment Apply an Oracle application patch or upgrade Back up Oracle data on the source or target Tune the Capture process Tune the Post process Appendix A: Peer-To-Peer Diagram Appendix B: SharePlex environment variables

Replicate to or from an Oracle PDB

Create a configuration file > Replicate to or from an Oracle PDB

SharePlex supports replication to and from a Pluggable Database (PDB) in an Oracle multitenant container database (CDB). This support is available on Unix and Linux platforms only.

Capture from a PDB

SharePlex can replicate data from one PDB to:

  • another PDB in the same CDB
  • a PDB in a different CDB
  • a regular (non-PDB) target

To capture from a PDB

  • In the configuration file, specify the tns_alias of a PDB as the datasource. For example, if the tns_alias is pdb1, the datasource specification is:

    Datasource: o.pdb1

  • You can replicate from as many pluggable databases (PDBs) in the same CDB as desired: Create a separate configuration file for each PDB. Because each PDB is a different datasource, all configurations can be active at the same time.
  • If replicating from more than one PDB on a system, use named export queues to separate the data streams from each one. This allows you to issue SharePlex commands that affect configurations, such as purge config or abort config, for one configuration without affecting the other configurations. For more information, see Configure named export queues.

Replicate to a PDB

SharePlex can replicate data from a regular source database to a PDB in a target Oracle CDB. In one configuration file, you can replicate to any number of target PDBs in the same CDB or a different CDB.

To replicate to a PDB

Specify the tns_alias of the target PDB in the routing map, as shown in the following example where pdb2 is the target:

sys02@o.pdb2

Examples

Example 1: This example shows two configuration files, one replicating from pdb1 and the other replicating from pdb2, both replicating data to pdb3.

Datasource: o.pdb1
hr.emp    hr2.emp2    sys02@o.pdb3
Datasource: o.pdb2 	 
sales.cust    sales2.cust2    sys02@o.pdb3

 

Example 2: This example shows one configuration file replicating from pdb1 to pdb2 and pdb3, both targets being on different systems.

Datasource: o.pdb1	 	 
hr.sal    hr2.sal2    sys02@o.pdb2
hr.sal    hr3.sal3    sys03@o.pdb3

Configuration examples

Create a configuration file > Configuration examples

These are examples of basic configuration files according to each possible datasource type and target type.

Replicate from a regular Oracle instance to a regular Oracle instance

Datasource:o.SID
src_owner.table tgt_owner.table

host@o.SID

Example

The following example replicates table SCOTT.EMP from Oracle instance oraA to target table SCOTT.EMP2 in Oracle instance oraB on target system sysprod.

Datasource:o.oraA
SCOTT.EMP    SCOTT.EMP2    sysprod@o.oraB

Replicate from a regular Oracle instance to an Open Target database

Datasource:o.SID
src_owner.table tgt_owner.table host@r.database_name
Example

The following example replicates table SCOTT.EMP from Oracle instance oraA to target table Scott2.Emp2 in Open Target database mydb on target system sys2. The target table is case-sensitive.

Datasource:o.oraA
SCOTT.EMP    "Scott2"."Emp2"    sys2@r.mydb

Note: The SharePlex-supported Open Target targets are listed in the SharePlex Release Notes. Other targets may be in beta testing. For more information about the SharePlex beta program, see the SharePlex Release Notes.

Replicate from a regular Oracle instance to a file in XML or SQL format

Datasource:o.SID
src_owner.table !file host
Example

The following example replicates table SCOTT.EMP from Oracle instance oraA to a file on target system sysprod.

Datasource:o.oraA
SCOTT.EMP   !file   sysprod

Replicate from a regular Oracle instance to a JMS queue or topic

Datasource:o.SID
src_owner.table !jms host
Example

The following example replicates table SCOTT.EMP from Oracle instance oraA to a JMS queue on target system sysprod.

Datasource:o.oraA
SCOTT.EMP   !jms   sysprod

Replicate from a regular Oracle instance to a Kafka topic

Datasource:o.SID
src_owner.table !kafka host
Example

The following example replicates table SCOTT.EMP from Oracle instance oraA to a Kafka topic on target system sysprod.

Datasource:o.oraA
SCOTT.EMP   !kafka  sysprod

Replicate from and to an Oracle pluggable database (PDB) in a container database (CDB)*

Datasource:o.PDBalias
src_owner.table tgt_owner.table

host@o.PDBalias

Example

This example replicates table SCOTT.EMP from an Oracle PDB that uses the tns_alias of aliasA to target table SCOTT.EMP in an Oracle PDB that uses the tns_alias of aliasB on target system sysprod.

Datasource:o.aliasA
SSCOTT.EMP    SCOTT.EMP    sysprod@o.aliasB

* You can also replicate data from an Oracle PDB to any other supported target. For more information, see Replicate to or from a PDB.

Replicate to maintain a change history target

Datasource:o.SID | r.database}

src_owner.table

!cdc:tgt_owner.table

host@c.SID

Example

The following example replicates table SCOTT.EMP from Oracle instance oraA to change-history target table SCOTT.EMP2 in Oracle instance oraB on target system sysprod.

Datasource:o.oraA
SCOTT.EMP     !cdc:SCOTT.EMP2     sysprod@c.oraB

For more information, see Configure replication to maintain a change history target.

Use a script to build a configuration file

Create a configuration file > Use a script to build a configuration file

SharePlex provides the following scripts that can be used to automate the building of your configuration file if the source and target object names are identical. These scripts support Oracle Database source and targets only.

Option Description To get more information
config.sql Builds a configuration file that includes all tables and sequences that are in the database. Source and target object names must be identical. See Build a configuration file using a script
build_config.sql Builds a configuration file that includes all tables in a schema. Source and target object names must be identical. See Build a configuration file using a script

Configure replication to Oracle on Amazon RDS

Create a configuration file > Configure replication to Oracle on Amazon RDS

SharePlex replicates to an Oracle database target that is installed within the RDS service of Amazon AWS. Because the RDS service does not give customers access to the operating system level of their RDS database installations, SharePlex must be configured so that the Post components (processes and queues) run on either the source system or on an intermediate system. This topic contains instructions for both of these scenarios.

Note: To install and set up the SharePlex environment to support replication to an RDS database, see the SharePlex Installation Guide.

To configure replication when Post components are installed on the source system

Specify the following in the routing map:

  • the name of the source host to specify the target system.

    Note: This differs from the usual target requirement, which is to specify the target system.

  • the ORACLE_SID of the target RDS database.

In the following example, spsrc2 is the source system and orcldb is the RDS database.

datasource:o.orcl12prim

#source tables

target tables

routing map

splex.demo_src

splex.demo_dest

spsrc2@o.orcldb

To configure replication when Post components are installed on an intermediate system

Specify the following in the routing map:

  • the name of the intermediate host to specify the target system.

    Note: This differs from the usual target requirement, which is to specify the target system.

  • the ORACLE_SID of the RDS database.

In the following example, sptest2 is the intermediate system and orcldb is the RDS database.

datasource:o.orcl12prim

#source tables

target tables

routing map

splex.demo_src

splex.demo_dest

sptest2@o.orcldb

Related Documents