9 Replicat

Learn about the Replicat process, its types, and steps to add a replicat, and other tasks associated with Replicat.

About Replicat

Replicat is a process that delivers data to a target system. It reads the trail file on the target database, reconstructs the DML or DDL operations, and applies them to the target database.

The Replicat process uses SQL to compile a SQL statement once and then executes it many times with different bind variables. You can configure the Replicat process so that it waits a specific amount of time before applying the replicated operations to the target database. For example, a delay may be desirable to prevent the propagation of errant SQL, to control data arrival across different time zones, or to allow time for other planned events to occur.

For the following two common uses cases of Oracle GoldenGate, the function of the Replicat process is as follows:

  • Initial Loads: When you set up Oracle GoldenGate for initial loads, the Replicat process applies a static data copy to target objects or routes the data to a high-speed bulk-load utility.
  • Change Synchronization: When you set up Oracle GoldenGate to keep the target database synchronized with the source database, the Replicat process applies the source operations to the target objects using a native database interface or ODBC, depending on the database type.

You can configure multiple Replicat processes with one or more Extract processes to increase the throughput. To preserve data integrity, each set of processes handles a different set of objects. To differentiate among Replicat processes, you assign each one a group name.

Select a Replicat Type for your Deployment

The Replicat process is responsible for applying trail data to the target database. Although you can choose from different types of Replicat modes, Oracle recommends that you use the parallel nonintegrated Replicat, unless a specific feature requires a different type of Replicat. Parallel Replicat is available for both Oracle and non-Oracle databases.

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 use MIN_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

ALLOWDUPTARGETMAP

See ALLOWDUPTARGETMAP | NOALLOWDUPTARGETMAP

No. Oracle Database with iPR

No, Oracle Database

Yes

Yes

Controlling Checkpoint Retention

The CHECKPOINTRETENTIONTIME option of the TRANLOGOPTIONS parameter controls the number of days that Replicat 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.

Excluding Replicat Transactions in Bidirectional Replication

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.

This can be implemented in two ways:

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 the SETTAG 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 for SETTAG is 00.
  • Use the TRANLOGOPTIONS parameter with the EXCLUDETAG option in an Extract parameter file. The logmining server associated with that Extract excludes redo that is tagged with the SETTAG value. Multiple EXCLUDETAG statements can be used to exclude different tag values, if desired.

Method 2

Valid for any implementation; Oracle or heterogeneous database configurations.

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.

Additional Parameter Options for Integrated Replicat

You can set these parameters by using the DBOPTIONS parameter with the INTEGRATEDPARAMS option or dynamically by issuing the SEND REPLICAT command with the INTEGRATEDPARAMS option.

The default Replicat configuration should be sufficient. However, if needed, you can set the following inbound server parameters to support specific requirements.

Note:

For detailed information and usage guidance for these parameters, see the "DBMS_APPLY_ADM" section in Oracle Database PL/SQL Packages and Types Reference.

See DBOPTIONS for more information about the parameter.

  • COMMIT_SERIALIZATION: Controls the order in which applied transactions are committed and has 2 modes, DEPENDENT_TRANSACTIONS and FULL. The default mode for Oracle GoldenGate is DEPENDENT_TRANSACTIONS where dependent transactions are applied in the correct order though may not necessarily be applied in source commit order. In FULL mode, the source commit order is enforced when applying transactions.

  • BATCHSQL_MODE: Controls the batch execution scheduling mode including pending dependencies. A pending dependency is a dependency on another transaction that has already been scheduled, but not completely executed. The default is DEPENDENT. You can use following three modes:

    DEPENDENT

    Dependency aware scheduling without an early start. Batched transactions are scheduled when there are no pending dependencies.

    DEPENDENT_EAGER

    Dependency aware batching with early start. Batched transactions are scheduled irrespective of pending dependencies.

    SEQUENTIAL

    Sequential batching. Transactions are batched by grouping the transactions sequentially based on the original commit order.

  • DISABLE_ON_ERROR: Determines whether the apply server is disabled or continues on an unresolved error. The default for Oracle GoldenGate is N (continue on errors), however, you can set the option to Y if you need to disable the apply server when an error occurs.

  • EAGER_SIZE: Sets a threshold for the size of a transaction (in number of LCRs) after which Oracle GoldenGate starts applying data before the commit record is received. The default for Oracle GoldenGate is 15100.

  • ENABLE_XSTREAM_TABLE_STATS: Controls whether statistics on applied transactions are recorded in the V$GOLDENGATE_TABLE_STATS view or not collected at all. The default for Oracle GoldenGate is Y (collect statistics).

  • MAX_PARALLELISM: Limits the number of apply servers that can be used when the load is heavy. This number is reduced again when the workload subsides. The automatic tuning of the number of apply servers is effective only if PARALLELISM is greater than 1 and MAX_PARALLELISM is greater than PARALLELISM. If PARALLELISM is equal to MAX_PARALLELISM, the number of apply servers remains constant during the workload. The default for Oracle GoldenGate is 50.

  • MAX_SGA_SIZE: Controls the amount of shared memory used by the inbound server. The shared memory is obtained from the streams pool of the SGA. The default for Oracle GoldenGate is INFINITE.

  • MESSAGE_TRACKING_FREQUENCY: Controls how often LCRs are marked for high-level LCR tracing through the apply processing. The default value is 2000000, meaning that every 2 millionth LCR is traced. A value of zero (0) disables LCR tracing.

  • PARALLELISM: Sets a minimum number of apply servers that can be used under normal conditions. Setting PARALLELISM to 1 disables apply parallelism, and transactions are applied with a single apply server process. The default for Oracle GoldenGate is 4. For Oracle Standard Edition, this must be set to 1.

  • PARALLELISM_INTERVAL: Sets the interval in seconds at which the current workload activity is computed. Replicat calculates the mean throughput every 5 X PARALLELISM_INTERVAL seconds. After each calculation, the apply component can increase or decrease the number of apply servers to try to improve throughput. If throughput is improved, the apply component keeps the new number of apply servers. The parallelism interval is used only if PARALLELISM is set to a value greater than one and the MAX_PARALLELISM value is greater than the PARALLELISM value. The default is 5 seconds.

  • PRESERVE_ENCRYPTION: Controls whether to preserve encryption for columns encrypted using Transparent Data Encryption. The default for Oracle GoldenGate is N (do not apply the data in encrypted form).

  • TRACE_LEVEL: Controls the level of tracing for the Replicat inbound server. For use only with guidance from Oracle Support. The default for Oracle GoldenGate is 0 (no tracing).

  • WRITE_ALERT_LOG: Controls whether the Replicat inbound server writes messages to the Oracle alert log. The default for Oracle GoldenGate is Y (yes).