4 Configuring Oracle GoldenGate Replicat
Topics:
- Choosing from Different Replicat Modes
- Prerequisites for Configuring Replicat
This topic provides the best practices for configuring Replicat. - About Checkpoint Table
- Configuring Replicat
Configure a Replicat process to configure Replicat for a pluggable database (PDB). Replicat can operate in any of the available modes within an Oracle multitenant container database. - Additional Configuration Steps For Using Nonintegrated Replicat
This chapter contains instructions that are specific only to Replicat when operating in nonintegrated mode. When Replicat operates in nonintegrated mode, triggers, cascade constraints, and unique identifiers must be properly configured in an Oracle GoldenGate environment. - Excluding Replicat Transactions
In a bidirectional configuration, Replicat must be configured to mark its transactions, and Extract must be configured to exclude Replicat transactions so that they do not propagate back to their source.
Choosing from Different Replicat Modes
Learn about the different Replicat modes for your database environment.
Topics:
- Deciding Which Apply Method to Use
The Replicat process is responsible for the application of replicated data to an Oracle target database. - Using Different Replicat Modes with Extract
The recommended Oracle GoldenGate configuration, when supported by the Oracle version, is to use one Extract on an Oracle source and one parallel Replicat per source database on an Oracle target.
Parent topic: Configuring Oracle GoldenGate Replicat
Deciding Which Apply Method to Use
The Replicat process is responsible for the application of replicated data to an Oracle target database.
For an Oracle target database, you can run Replicat in parallel, non-integrated or integrated mode. Oracle recommends that you use the parallel Replicat unless a specific feature requires a different type of Replicat.
The following table lists the features supported by the respective Replicats.
Feature | Parallel Replicat | Integrated Replicat | Coordinated Replicat | Classic Replicat |
---|---|---|---|---|
Batch Processing |
Yes |
Yes |
Yes |
Yes |
Barrier Transactions |
Yes |
Yes |
Yes |
No |
Dependency Computation |
Yes |
Yes |
No |
No |
Auto-parallelism
Note: Auto-parallelism is disabled, by default. Only four threads are used in the default settings. If you want to change Replicat to useMIN_PARALLELISM and
MAX_PARALLELISM then auto-parallelism
is used.
|
Yes |
Yes |
No |
No |
DML Handler |
Yes, Integrated mode |
Yes |
No |
No |
Procedural Replication |
Yes, used for integrated Parallel Replicat (iPR) |
Yes |
No |
No |
Auto CDR |
Yes, used by iPR only |
Yes |
No |
No |
Dependency-aware Transaction Split |
Yes |
No |
No |
No |
Cross-RAC-node Processing |
Yes |
No |
Yes |
No |
|
No. Oracle Database with iPR |
No, Oracle Database |
Yes |
Yes |
Topics:
Parent topic: Choosing from Different Replicat Modes
About Parallel Replicat
Parallel Replicat is another variant of Replicat that applies transactions in parallel to improve performance.
Note:
For best performance for an OLTP workload, parallel Replicat in non-integrated mode is recommended.Only Oracle database supports parallel Replicat and integrated parallel Replicat. However, parallel Replicat supports all databases when using the non-integrated option.
-
Metadata in the trail (which means you can't use parallel Replicat if your trails are formatted below 12.1.
-
Scheduling columns in the trail file.
-
UPDATERCORDFORMAT COMPACT
parameter.
With integrated parallel Replicat, the Replicat sends the LCRs to the inbound server, which applies the data to the target database, and in regular parallel Replicat, Oracle GoldenGate applies the LCR as a SQL statement directly to the database, similar to how the other non-integrated Replicats work.
-
Mappers operate in parallel to read the trail, map trail records, convert the mapped records to the Integrated Replicat LCR format, and send the LCRs to the Merger for further processing. While one Mapper maps one set of transactions, the next Mapper maps the next set of transactions. The the trail information is split and the trail file is untouched because it orders trail information in order.
-
Master processes have two threads, Collater and Scheduler. The Collater receives mapped transactions from the Mappers and puts them back into trail order for dependency calculation. The Scheduler calculates dependencies between transactions, groups transactions into independent batches, and sends the batches to the Appliers to be applied to the target database.
-
Appliers reorder records within a batch for array execution. It applies the batch to the target database and performs error handling. It also tracks applied transactions in checkpoint tables.
Note:
Parallel Replicat requires that any foreign key columns are indexed.- Benefits of Parallel Replicat
- Parallel Replication Architecture
Parallel replication processes leverage the apply processing functionality that is available within the Oracle Database in integrated mode.
Parent topic: Deciding Which Apply Method to Use
Benefits of Parallel Replicat
The following are the benefits of using parallel Replicat.
-
Integrated Parallel Replicat enables heavy workloads to be partitioned automatically among parallel apply processes that apply multiple transactions concurrently, while preserving the integrity and atomicity of the source transaction. Both a minimum and maximum number of apply processes can be configured with the
PARALLELISM
andMAX_PARALLELISM
parameters. Replicat automatically adds additional servers when the workload increases, and then adjusts downward again when the workload lightens. -
Integrated Parllel Replicat requires minimal work to configure. All work is configured within one Replicat parameter file, without configuring range partitions.
-
High-performance apply streaming is enabled for integrated parallel Replicat by means of a lightweight application programming interface (API) between Replicat and the inbound server.
-
Barrier transactions are coordinated by integrated parallel Replicat among multiple server apply processes.
-
DDL operations are processed as direct transactions that force a barrier by waiting for server processing to complete before the DDL execution.
-
Transient duplicate primary key updates are handled by integrated parallel Replicat in a seamless manner.
- Parallel Replicat can break a single large transaction into smaller chunks and
apply those chunks in parallel. See the
SPLIT_TRANS_RECS
for details.
Parent topic: About Parallel Replicat
Parallel Replication Architecture
Parallel replication processes leverage the apply processing functionality that is available within the Oracle Database in integrated mode.
Within a single Replicat configuration, multiple inbound server child processes, known as apply servers, apply transactions in parallel while preserving the original transaction atomicity.
The following architecture diagram depicts the flow of change records through the various processes of a parallel replication from the trail files to the target database, for a non-integrated parallel Replicat.

Description of the illustration para_rep_arch.png
The Mappers read the trail file and map records, forward the mapped records to the Master. The batches are sent to the Appliers where they are applied to the target database.
The Master process consists of two separate threads, Collater and Scheduler. The Collater is responsible for managing and communicating with the Mappers, along with receiving the mapped transactions and reordering them into a single in-order stream. The Scheduler is responsible for managing and communicating with the Appliers, along with reading transactions from the Collater, batching them, and scheduling them to Appliers.
The Scheduler controller communicates with the Scheduler to gather any necessary information (such as, the current low watermark position). The Scheduler controller is required for CDB mode for Oracle Database because it is responsible for aggregating information pertaining to the different target PDBs and reporting a unified picture. The Scheduler controller is created for simplicity and uniformity of implementation, even when not in CDB mode. Every process reads the parameter file and shares a single checkpoint file.
Parent topic: About Parallel Replicat
About Non-integrated Replicat
In non-integrated mode, the Replicat process uses standard SQL to apply data directly to the target tables. In this mode, Replicat operates as follows:
-
Reads the Oracle GoldenGate trail.
-
Performs data filtering, mapping, and conversion.
-
Constructs SQL statements that represent source database DML or DDL transactions (in committed order).
-
Applies the SQL to the target through Oracle Call Interface (OCI).
The following diagram illustrates the configuration of Replicat in non-integrated mode.
Use non-integrated Replicat when you want to make heavy use of features that are not supported in integrated Replicat mode, see About Integrated Replicat.
You can apply transactions in parallel with a non-integrated Replicat by using a coordinated Replicat configuration.
Parent topic: Deciding Which Apply Method to Use
About Integrated Replicat
In integrated mode, the Replicat process leverages the apply processing functionality that is available within the Oracle Database. In this mode, Replicat operates as follows:
-
Reads the Oracle GoldenGate trail.
-
Performs data filtering, mapping, and conversion.
-
Constructs logical change records (LCR) that represent source database DML transactions (in committed order). DDL is applied directly by Replicat.
-
Attaches to a background process in the target database known as a database inbound server by means of a lightweight streaming interface.
-
Transmits the LCRs to the inbound server, which applies the data to the target database.
The following figure illustrates the configuration of Replicat in integrated mode.
Within a single Replicat configuration, multiple inbound server child processes known as apply servers apply transactions in parallel while preserving the original transaction atomicity. You can increase this parallelism as much as your target system will support when you configure the Replicat process or dynamically as needed. The following diagram illustrates integrated Replicat configured with two parallel apply servers.
Integrated Replicat applies transactions asynchronously. Transactions that do not have interdependencies can be safely executed and committed out of order to achieve fast throughput. Transactions with dependencies are guaranteed to be applied in the same order as on the source.
A reader process in the inbound server computes the dependencies among the transactions in the workload based on the constraints defined at the target database (primary key, unique, foreign key). Barrier transactions and DDL operations are managed automatically, as well. A coordinator process coordinates multiple transactions and maintains order among the apply servers.
If the inbound server does not support a configured feature or column type, Replicat disengages from the inbound server, waits for the inbound server to complete transactions in its queue, and then applies the transaction to the database in direct apply mode through OCI. Replicat resumes processing in integrated mode after applying the direct transaction.
The following features are applied in direct mode by Replicat:
-
DDL operations
-
Sequence operations
-
SQLEXEC
parameter within aTABLE
orMAP
parameter -
EVENTACTIONS
processing -
UDT
Note:
By default, UDT's are applied with the inbound server. Only ifNOUSENATIVEOBJSUPPORT
is in place, then Extract handling is done by Replicat directly.
Because transactions are applied serially in direct apply mode, heavy use of such operations may reduce the performance of the integrated Replicat mode. Integrated Replicat performs best when most of the apply processing can be performed in integrated mode, see Monitoring and Controlling Processing After the Instantiation in Using Oracle GoldenGate for Oracle Database.
Note:
User exits are executed in integrated mode. However, user exit may produce unexpected results, if the exit code depends on data in the replication stream.
Note:
Integrated Replicat requires that any foreign key columns are indexed.Parent topic: Deciding Which Apply Method to Use
Benefits of Integrated Replicat
The following are the benefits of using integrated Replicat versus nonintegrated Replicat.
-
Integrated Replicat enables heavy workloads to be partitioned automatically among parallel apply processes that apply multiple transactions concurrently, while preserving the integrity and atomicity of the source transaction. Both a minimum and maximum number of apply processes can be configured with the
PARALLELISM
andMAX_PARALLELISM
parameters. Replicat automatically adds additional servers when the workload increases, and then adjusts downward again when the workload lightens. -
Integrated Replicat requires minimal work to configure. All work is configured within one Replicat parameter file, without configuring range partitions.
-
High-performance apply streaming is enabled for integrated Replicat by means of a lightweight application programming interface (API) between Replicat and the inbound server.
-
Barrier transactions are coordinated by integrated Replicat among multiple server apply processes.
-
DDL operations are processed as direct transactions that force a barrier by waiting for server processing to complete before the DDL execution.
-
Transient duplicate primary key updates are handled by integrated Replicat in a seamless manner.
Parent topic: About Integrated Replicat
Integrated Replicat Requirements
To use integrated Replicat, the following must be true.
-
Supplemental logging must be enabled on the source database to support the computation of dependencies among tables and scheduling of concurrent transactions on the target. Instructions for enabling the required logging are in Configuring Logging Properties. This logging can be enabled at any time up to, but before, you start the Oracle GoldenGate processes.
-
Integrated Parallel Replicat is supported on Oracle Database 12.2.0.1 and greater.
Parent topic: About Integrated Replicat
Using Different Replicat Modes with Extract
The recommended Oracle GoldenGate configuration, when supported by the Oracle version, is to use one Extract on an Oracle source and one parallel Replicat per source database on an Oracle target.
One integrated Replicat configuration supports all Oracle data types either through the inbound server or by switching to direct apply when necessary, and it preserves source transaction integrity. You can adjust the parallelism settings to the desired apply performance level as needed.
Each Extract group must process objects that are suited to the processing mode, based on table data types and attributes. No objects in one Extract can have DML or DDL dependencies on objects in the other Extract. The same type of segregation must be applied to the Replicat configuration.
If the target database is an Oracle version that does not support integrated Replicat, or if it is a non-Oracle database, you can use a coordinated or parallel Replicat configuration.
Parent topic: Choosing from Different Replicat Modes
Prerequisites for Configuring Replicat
This topic provides the best practices for configuring Replicat.
The guidelines to follow before configuring Replicat are:
-
Create the Oracle GoldenGate instance on the target system by configuring the Manager process.
See Prerequisites for Configuring Replicat.
Also see, Quickstart Bidirectional Replication to learn about using the active-active replication process in case of bidirectional replication.
Parent topic: Configuring Oracle GoldenGate Replicat
About Checkpoint Table
The checkpoint table is a required component of Replicat.
A Replicat maintains its recovery checkpoints in the checkpoint table, which is stored in the target database. Checkpoints are written to the checkpoint table within the Replicat transaction. Because a checkpoint either succeeds or fails with the transaction, Replicat ensures that a transaction is only applied once, even if there is a failure of the process or the database. See Before You Add a Replicat in the Oracle GoldenGate Microservices Documentation to learn to create checkpoint tables from the Microservices web interface.
Note:
Oracle recommends using checkpoint tables. Multiple classic or coordinated Replicats can share the same checkpoint table, but that may not result in the best performance. With high volume environments, you must ensure that the checkpoint tables do not reside on different drives to become a point of conflict.
See Instantiating Oracle GoldenGate Replication for more information.
- Include the Checkpoint Table in the GLOBALS File
- Disabling Default Asynchronous COMMIT to Checkpoint Table
- Controlling the Checkpoint Retention
TheCHECKPOINTRETENTIONTIME
option of theTRANLOGOPTIONS
parameter controls the number of days that Extract retains checkpoints before purging them automatically.
Parent topic: Configuring Oracle GoldenGate Replicat
Include the Checkpoint Table in the GLOBALS File
To specify the checkpoint table in the Oracle GoldenGate configuration:
Parent topic: About Checkpoint Table
Disabling Default Asynchronous COMMIT to Checkpoint Table
When a nonintegrated Replicat uses a checkpoint table, it uses an asynchronous COMMIT
with the NOWAIT
option to improve performance. Replicat can continue processing immediately after applying this COMMIT
, while the database logs the transaction in the background. You can disable the asynchronous COMMIT
with NOWAIT
by using the DBOPTIONS
parameter with the DISABLECOMMITNOWAIT
option in the Replicat parameter file.
Note:
When the configuration of a nonintegrated Replicat group does not include a checkpoint table, the checkpoints are maintained in a file on disk. In this case, Replicat uses COMMIT
with WAIT
to prevent inconsistencies in the event of a database failure that causes the state of the transaction, as in the checkpoint file, to be different than its state after the recovery.
Parent topic: About Checkpoint Table
Controlling the Checkpoint Retention
The CHECKPOINTRETENTIONTIME
option of the
TRANLOGOPTIONS
parameter controls the number of days that Extract
retains checkpoints before purging them automatically.
Partial days can be specified using decimal values. For example, 8.25 specifies 8 days and 6 hours. The default is seven days.
Parent topic: About Checkpoint Table
Configuring Replicat
Configure a Replicat process to configure Replicat for a pluggable database (PDB). Replicat can operate in any of the available modes within an Oracle multitenant container database.
To add a Replicat from the command line interface, see the ADD REPLICAT
from GGSCI.
Use the following steps to configure the parameters for different Replicat modes.
Parent topic: Configuring Oracle GoldenGate Replicat
Additional Configuration Steps For Using Nonintegrated Replicat
This chapter is a supplement to the basic configuration requirements that are documented in Configuring Oracle GoldenGate Replicat.
Topics:
- Disabling Triggers and Referential Cascade Constraints on Target Tables
Triggers and cascade constraints must be disabled on Oracle target tables when Replicat is in nonintegrated mode. - Deferring Constraint Checking on Target Tables
When Replicat is in nonintegrated mode, you may need to defer constraint checking on the target.
Parent topic: Configuring Oracle GoldenGate Replicat
Disabling Triggers and Referential Cascade Constraints on Target Tables
Triggers and cascade constraints must be disabled on Oracle target tables when Replicat is in nonintegrated mode.
Oracle GoldenGate provides some options to handle triggers or cascade constraints automatically, depending on the Oracle version:
-
For Oracle 11.2.0.2 and later 11gR2 versions, Replicat automatically disables the work performed by triggers during its session. It does not disable a trigger, but instead prevents the trigger body from executing. The
WHEN
portion of the trigger must still compile and execute correctly to avoid database errors. To enable triggers to fire, or to disable them manually, use theNOSUPPRESSTRIGGERS
option ofDBOPTIONS
and place the statement after theUSERIDALIAS
parameter. To allow a specific trigger to fire, you can use the following database procedure, wheretrigger_owner
is the owner of the trigger andtrigger_name
is the name of the trigger. Once the procedure is called withFALSE
for a particular trigger, it remains set until the procedure is called withTRUE
. dbms_ddl.set_trigger_firing_property(
trigger_owner
"trigger_name
", FALSE)-
For Oracle 11.2.0.2 and later 11gR2 versions, you can use the
DBOPTIONS
parameter with theDEFERREFCONST
option to delay the checking and enforcement of cascade update and cascade delete constraints until the Replicat transaction commits. -
For other Oracle versions, you must disable triggers and integrity constraints or alter them manually to ignore the Replicat database user.
Constraints must be disabled in nonintegrated Replicat mode because Oracle GoldenGate replicates DML that results from the firing of a trigger or a cascade constraint. If the same trigger or constraint gets activated on the target table, it becomes redundant because of the replicated version, and the database returns an error. Consider the following example, where the source tables are emp_src
and salary_src
and the target tables are emp_targ
and salary_targ
.
-
A delete is issued for
emp_src
. -
It cascades a delete to
salary_src
. -
Oracle GoldenGate sends both deletes to the target.
-
The parent delete arrives first and is applied to
emp_targ
. -
The parent delete cascades a delete to
salary_targ
. -
The cascaded delete from
salary_src
is applied tosalary_targ
. -
The row cannot be located because it was already deleted in step 5.
Deferring Constraint Checking on Target Tables
When Replicat is in nonintegrated mode, you may need to defer constraint checking on the target.
Perform the following steps to defer the constraints:
In this example, when Replicat applies the first update to the target, there is an ORA-00001 (unique constraint) error because the key value of 2 already exists in the table. The Replicat transaction returns constraint violation errors. By default, Replicat does not handle these violations and abends.
Handling Transient Primary-key Duplicates in Version 11.2.0.4 or Later
For versions later than 11.2.0.4, a nonintegrated Replicat by default tries to resolve transient primary-key duplicates automatically by using a workspace in Oracle Workspace Manager. In this configuration, Replicat can defer the constraint checking until commit time without requiring the constraints to be explicitly defined as deferrable.
The requirements for automatic handling of transient primary-key duplicates are:
-
Grant the Replicat database user access to the following Oracle function:
DBMS_XSTREAM_GG.ENABLE_TDUP_WORKSPACE()
-
The target tables cannot have deferrable constraints; otherwise Replicat returns an error and abends.
To handle tables with deferrable constraints, make certain the constraints are DEFERRABLE INITIALLY IMMEDIATE
, and use the HANDLETPKUPDATE
parameter in the MAP
statement that maps that table. The HANDLETPKUPDATE
parameter overrides the default of handling the duplicates automatically.The use of a workspace affects the following Oracle GoldenGate error handling parameters:
-
HANDLECOLLISIONS
-
REPERROR
When Replicat enables a workspace in Oracle Workspace Manager, it ignores the error handling that is specified by Oracle GoldenGate parameters such as HANDLECOLLISIONS
and REPERROR
. Instead, Replicat aborts its grouped transaction (if BATCHSQL
is enabled), and then retries the update in normal mode by using the active workspace. If ORA-00001 occurs again, Replicat rolls back the transaction and then retries the transaction with error-handling rules in effect again.
Note:
If Replicat encounters ORA-00001 for a non-update record, the error-handling parameters such as HANDLECOLLISIONS
and REPERROR
handle it.
A workspace cannot be used if the operation that contains a transient primary-key duplicate also has updates to any out-of-line columns, such as LOB and XMLType. Therefore, these cases are not supported, and any such cases can result in undetected data corruption on the target. An example of this is:
update T set PK = PK + 1, C_LOB = 'ABC';
Parent topic: Deferring Constraint Checking on Target Tables
Excluding Replicat Transactions
In a bidirectional configuration, Replicat must be configured to mark its transactions, and Extract must be configured to exclude Replicat transactions so that they do not propagate back to their source.
There are two methods to accomplish this as follows:
Method 1
Valid only for Oracle to Oracle implementations.
Replicat can be in either integrated or nonintegrated mode. Use the following parameters:
-
Use
DBOPTIONS
with theSETTAG
option in the Replicat parameter file. The inbound server tags the transactions of that Replicat with the specified value, which identifies those transactions in the redo stream. The default value forSETTAG
is 00. -
Use the
TRANLOGOPTIONS
parameter with theEXCLUDETAG
option in an Extract parameter file. The logmining server associated with that Extract excludes redo that is tagged with theSETTAG
value. MultipleEXCLUDETAG
statements can be used to exclude different tag values, if desired.For Oracle to Oracle, this is the recommended method.
Method 2
Valid for any implementation; Oracle or heterogeneous database configurations.
Alternatively, you could use the Extract TRANLOGOPTIONS
parameter
with the EXCLUDEUSER
or EXCLUDEUSERID
option to
ignore the Replicat DDL and DML transactions based on its user name or ID. Multiple
EXCLUDEUSER
statements can be used. The specified user is
subject to the rules of the GETREPLICATES
or
IGNOREREPLICATES
parameter.
For more information, see Reference for Oracle GoldenGate.
Parent topic: Configuring Oracle GoldenGate Replicat