Cloud Object Storage Replication

This chapter describes Cloud Object Storage Replication Best Practices.

Introduction

Oracle GoldenGate Cloud Object Storage Replication is an integral component of the Oracle GoldenGate for Distributed Applications and Analytics (Oracle GoldenGate for DAA) package. It uses a modular handler architecture, enabling flexible and reliable replication of change data from an Oracle GoldenGate trail to target cloud object storage systems including:

For the latest certified source/target compatibility, see the Oracle GoldenGate certification matrix.

To meet diverse downstream consumption requirements-ranging from data lakes to AI/ML pipelines-the Cloud Object Storage Replicat supports a wide array of industry-standard serialization formats:

These format options, combined with configurable file size controls, allow users to align output with their downstream integration and storage standards.

Oracle GoldenGate provides granular control over how data is landed in the object storage to ensure alignment with organizational data standards:

The following sections provide in-depth coverage of the Cloud Object Storage Replicat architecture, configuration best practices, and guidance for maximizing performance, durability, and data integrity.

Architecture Overview

Oracle GoldenGate Cloud Object Storage Replication architecture is fundamentally a log-based CDC pipeline designed for high-throughput and transactional integrity. As illustrated in the diagram, the architecture bridges relational and non-relational source systems with the Object Storage ecosystem. Figure 2: Oracle GoldenGate Cloud Object Storage Logical Architecture and Key Components

Description of image follows

The core design principle is decoupling. The use of the persistent trail files physically separates the Extract process (capture) from the Replicat (delivery). This is a vital architectural advantage because:

The overall architecture consists of the following major components:

Internally, the Replicat operates in two stages:

  1. Replicat creates a local file and starts writing change data to it. When the configured rollover threshold—based on file size, elapsed time, or an inactivity period—is reached, Replicat closes the file.

  2. Once the file is closed, it is uploaded to the target object storage. Bucket/container mapping can be dynamically assigned at runtime to support custom partitioning strategies.

    Files are uploaded only after they are closed (rolled over), so rollover settings directly influence end-to-end data availability latency.

    This modular, decoupled architecture enables organizations to build real-time, cloud-native data pipelines with minimal impact on source systems.

Configuration Considerations and Best Practices

The configuration of Oracle GoldenGate Cloud Object Storage Replication involves two core elements:

File Rollover Configuration

The Cloud Object Storage Replicat creates a file in the local file system and keeps it open until a rollover condition is met or triggered by a metadata change event from the source (like DDL change).

Users can control file rollover by using four different properties. For more details, see Configuring the File Writer Handler in Oracle GoldenGate for DAA documentation.

Add one or more configurations to Replicat properties file.

Implementation and Configuration

To implement the rollover configuration, set the required property as needed. If more than one rollover condition is configured, the file rolls over when the first condition is met. For example: You set max file size to 1 GB and file roll interval to 1 minute. 1 GB file size is reached in 45 seconds. In this case, Replicat does not wait for 1 minute and rolls over to a new one.

gg.handler.<gg.target value>.maxFileSize
gg.handler.<gg.target value>.fileRollInterval
gg.handler.<gg.target value>.inactivityRollInterval
gg.handler.<gg.target value>.rollOnShutdown

For example, if you are replicating to OCI Object Storage, at the top of the Replicat properties file you, see gg.target=oci.

Sample configurations for OCI Object Storage:

gg.handler.oci.maxFileSize=1gb
gg.handler.oci.fileRollInterval=1m
gg.handler.oci.inactivityRollInterval=5s
gg.handler.oci.rollOnShutdown=true

For more information on the legal values that can be used with these properties, see Oracle GoldenGate for DAA documentation.

Considerations and Best Practices

Partitioning

The Cloud Object Storage Replicat supports creating partitioned files in target object storage buckets. Partitioning improves downstream pruning and query performance, but over-partitioning increases directory/file counts and amplifies the small-file problem.

To use partitioning, data must be partitioned by the table at the highest level. This is done using the pathMappingTemplate property and it should be set to the fully qualified table name. It will create directories within the container/bucket based on the fully qualified source table name. For example:

gg.eventhandler.<gg.target value>.pathMappingTemplate=${fullyQualifiedTableName}

At runtime, the path resolves to the fully qualified source table name.

For creating partitions, gg.handler.<gg.target value>.partitioner.<fully_qualified_table_name> is used. This property can be used with template keyword such as ${columnValue[column_name]} or constant string values to define the partition path structure.

Implementation and Configuration

For example, given a source table SALES.CUSTOMER, the following configuration partitions files by the STATE column in the OCI Object Storage:

gg.eventhandler.oci.pathMappingTemplate=${fullyQualifiedTableName}
gg.handler.oci.partitioner.SALES.CUSTOMER=STATE=${columnValue[STATE]}

This configuration will create a directory called SALES.CUSTOMER in the OCI Object Storage bucket, additional directories within called STATE=<state_value> and within that directory, files are created per STATE.

SALES.CUSTOMER/ STATE=<state_value>/ <files...>

Multi-layer partitioning is also possible. For example, given a source table SALES.CUSTOMER, the following configuration partitions files by the STATE and CITY column in the OCI Object Storage:

gg.eventhandler.oci.pathMappingTemplate=${fullyQualifiedTableName}
gg.handler.oci.partitioner.SALES.CUSTOMER=STATE=${columnValue[STATE]}/CITY=${columnValue[CITY]}

This configuration will create a directory called SALES.CUSTOMER in the OCI Object Storage bucket, additional directories within called STATE=<state_value>, within each STATE directory, sub-directories are created per CITY value, and files are written within each CITY directory.

SALES.CUSTOMER/ STATE=<state_value>/ CITY=<city_value>/ <files...>

In a single Replicat, you can use multiple partitioning configurations for several tables.

Considerations and Best Practices

DDL Changes and Schema Propagation

The Oracle GoldenGate Cloud Object Storage Replication propagates source DDL changes automatically to the files generated. Alternatively, EVENTACTIONS can be used to control the Extract/Replicat behavior in case of a DDL operation in the source database.

Implementation and Configuration

If you do not want to propagate the schema changes automatically, you can use EVENTACTIONS to control the Extract/Replicat behavior. In this case, EVENTACTIONS is used together with DDL parameter. For example, if DDL INCLUDE ALL EVENTACTIONS (LOG INFO, STOP) is included in the Extract/Replicat parameter file, this includes all the source DDL operations, stop the Extract/Replicat and logs the event.

Considerations and Best Practices

PK Updates

In the Oracle GoldenGate Cloud Object Storage Replication, primary key update operations require special consideration and planning.

Implementation and Configuration

Based on the target file format, there can be some special considerations; but the Replicat handles PK updates in there modes. This is controlled by adding gg.handler.name.format.pkUpdateHandlingto the Replicat properties. There are values that can be used with this property, such as abend, update, and delete-insert.

For example, while replicating to OCI Object Storage set gg.handler.<gg.target value>.format.pkUpdateHandling=delete-insert for replicating PK updates as one delete (before image) and one insert (after image) record.

Considerations and Best Practices

Related Topics

DATE and TIMESTAMP Types

Oracle DATE and TIMESTAMP columns are replicated as strings by default when no explicit mapping is configured. Without proper mapping, downstream engines will not recognize these columns as date/time types, making date arithmetic, range filtering, and time-based partitioning impossible without explicit casting. The enableTimestampLogicalType property enables mapping of Oracle DATE and TIMESTAMP columns to the Avro timestamp-micros logical type, which represents values as microseconds since epoch - the correct representation for analytical and data lake workloads.

Implementation and Configuration

In the Oracle GoldenGate Cloud Object Storage Replication, source DATE and TIMESTAMP types are mapped to Avro files (including Parquet, Iceberg and Delta) as STRING by default. To replicate source DATE and TIMESTAMP types as timestamp-micros logical type to Avro files (including Parquet, Iceberg and Delta), set gg.handler.<gg.target value>.format.enableTimestampLogicalType to true. When timestamp logical type enabled, gg.format.timestamp is also required. For example:

gg.handler.oci.format.enableTimestampLogicalType= truegg.format.timestamp=yyyy-MM-dd HH:mm:ss.SSSSSS

For more information, see Oracle GoldenGate for Distributed Applications and Analytics documentation.

Considerations and Best Practices

Number Types

Oracle NUMBER is a variable-precision decimal data type that can represent integers and fixed-point decimal values with up to 38 digits of precision. If a column is defined without explicit precision and scale (for example, NUMBER), Oracle can store values with varying scale across rows, and in some replication/schema-generation scenarios the formatter may not be able to deterministically derive a single precision/scale for the target schema. As a result, mappings to Avro/Parquet often use a conservative decimal representation unless you explicitly configure precision and scale to match the source column definitions.

Implementation and Configuration

gg.handler.<gg.target value>.enableDecimalLogicalType is the master switch for decimal logical type mapping. When set to true, it instructs the Avro formatter to map Oracle NUMBER columns to the Avro decimal logical type (bytes with logicalType: decimal) instead of the default mapping which writes numbers as plain Avro numeric primitives or strings.

When precision/scale can’t be deterministically inferred, the formatter typically chooses a conservative Avro decimal definition (high precision and scale) to avoid precision loss. This can lead to downstream consumers seeing values expressed with an unnecessarily large scale (for example, apparent trailing fractional digits). To align the target schema with known, consistent source definitions-especially for financial data (balances, prices, amounts)-set gg.handler.<gg.target value>.maxPrecision and gg.handler.<gg.target value>.oracleNumberScale.

For example:

gg.handler.oci.enableDecimalLogicalType=true

gg.handler.oci.maxPrecision=38

gg.handler.oci.oracleNumberScale=12

For more information on configuration details, see Pluggable Formatters documentation.

Considerations and Best Practices

Performance Considerations

The Oracle GoldenGate Cloud Object Storage Replication performance can be tuned using two key features: Replicat type and GROUPTRANSOPS parameter. In addition to the Replicat type and transaction grouping, the size of the files produced by the Replicat directly affects throughput and should be tuned in conjunction with the other settings.

Oracle GoldenGate Distributed Applications and Analytics provides two different replication modes: Classic Replicat and Coordinated Replicat. Classic Replicat is a single-threaded process that applies the messages to target cloud storage services. Coordinated Replicat is a multi-threaded process where multiple threads read the OGG trail file independently and apply transactions in parallel.

The Oracle GoldenGate Cloud Object Storage Replication process optimizes processing with transaction grouping. The GROUPTRANSOPS parameter groups multiple small transactions into a single larger transaction applied to cloud storage targets. The GROUPTRANSOPS parameter counts the database operations (inserts, updates, and deletes) and only commits the transaction group when the number of operations equals or exceeds the GROUPTRANSOPS configuration setting. GROUPTRANSOPS defers the transaction commit call until the larger transaction is completed. When a transaction is committed, the Replicat flushes the operations.

Implementation and Configuration

Replicat Type is selected at the first step of Replicat creation process. In UI, select the Replicat type as Classic Replicat or Coordinated Replicat.

GROUPTRANSOPS is configured in parameters file. By default, GROUPTRANSOPS is set to 1000. You can increase up to 20000 for better performance. For example:

GROUPTRANSOPS 20000

For more information on how you can configure the file sizes generated by the Replicat, see File Rollover Configuration section.

Different performance optimization configurations may have different impact on the server resources. Below chart compares the performance improvements and the impact on the resources. Note that the tests were executed using OCI GoldenGate and 1 OCPU equals to 16GB of memory.

Table 5 Performance Improvements and the Impact on the Resources

Replicat Type GROUPTRANSOPS Settings Max OCPU* Performance Improvement
Classic Replicat 1,000 4 1x
Classic Replicat 20,000 4 3x
Coordinated Replicat with 20 threads 1,000 8 5x
Coordinated Replicat with 20 threads 20,000 12 8x

Note: * 1 OCPU is equivalent to 16 GB of memory.

Considerations and Best Practices