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.
SharePlex can replicate data from one PDB to:
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
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
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
These are examples of basic configuration files according to each possible datasource type and target type.
Datasource:o.SID | ||
src_owner.table | tgt_owner.table |
host@o.SID |
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
Datasource:o.SID | ||
src_owner.table | tgt_owner.table | host@r.database_name |
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.
Datasource:o.SID | ||
src_owner.table | !file | host |
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
Datasource:o.SID | ||
src_owner.table | !jms | host |
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
Datasource:o.SID | ||
src_owner.table | !kafka | host |
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
Datasource:o.PDBalias | ||
src_owner.table | tgt_owner.table |
host@o.PDBalias |
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.
Datasource:o.SID | r.database} | ||
src_owner.table |
!cdc:tgt_owner.table |
host@c.SID |
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.
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 |
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.
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.
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 |
© 2021 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy