Replicating Data

The Oracle Cloud Infrastructure GoldenGate Deployment Console is the interface you use to create, manage, and monitor GoldenGate Deployments.

You launch the GoldenGate Deployment Console from a deployment's Actions (three dots) menu on the Deployments page, or from the deployment's Details page. Log in with the GoldenGate username and password that you specified when you created the deployment.

After you log in successfully, you're brought to the GoldenGate Deployment Console Administration Service Overview.

Description of ogginstance_ui_labeled.png follows

The main areas of the Administration Service Console are:

  1. Navigation menu: Click the navigation icon to show or hide the navigation menu.
  2. The navigation bar lets you switch between the following services:
    • Administration Service: (currently shown) Administers, manages, and monitors Extract and Replicat processes within an Oracle GoldenGate deployment.
    • Distribution Service: A networked data distribution agent that conveys and processes data and commands in a distributed deployment environment.
    • Performance Metrics Service: Collects and stores deployment performance results.
    • Receiver Service: Interoperates with the Distribution Server to handle all incoming trail files.
  3. Extracts: Displays the number of running, failed, or other Extracts. Click Add Extract (plus icon) to create a new Extract.
  4. Replicats: Displays the number of running, failed, or other Replicats. Click Add Replicat (plus icon) to create a new Replicat.
  5. Critical Events: Displays the severity of critical events.

Before You Begin

For all Oracle Databases, ensure that you:

Adding Transaction Information

Enable table-level supplemental by adding TRANDATA. If schema-level supplemental logging is already enabled, you can skip this task.

For more information see, Configuring Logging Properties.

To add TRANDATA:
  1. Log in to the GoldenGate Deployment Console if you aren't already logged in.
  2. In the navigation menu, click Configuration.
  3. In the Administration Service tab, go to the Database tab, and then click the connect icon for the source CDB database.
  4. Click the plus (+) icon next to TRANDATA Information.
  5. For Schema Name, enter the database schema name, and then click Submit.

Creating an Extract

Before you create an Extract, if you don't already have supplemental logging enabled, then ensure that you first add transaction information.
To create an Extract:
  1. From the Overview page of the Administration Service, click Add Extract (plus sign).
  2. Choose the type of Extract to create and then click Next.
  3. Provide the required information designated with an asterisk (*). Here's a description of the options in the different sections for the Add Extract screen:
    Option Description Database
    Basic Information Section

    Process Name

    Name of the Extract process. The name of the Extract process can be up to 8 characters.

    All databases

    Description

    Description of the Extract process being created.

    All databases

    Intent

    Describes the purpose of creating the Extract. The default option is Unidirectional. Other options are High Availability, Disaster Recovery, N-Way, which are informational only.

    All databases

    Begin

    Used to set the beginning location in the redo or transaction log from which the Extract will start to capture data. Available options are Now, Custom Time, CSN or Position in Log, and EOF depending on the supported database.

    All databases

    Trail Name

    A two character trail name.

    All databases

    Trail Subdirectory, Size, Sequence, and Offset

    You can further configure the trail details.

    All databases

    Remote

    Enable this option if the Extract trail is remote.

    For Oracle databases, enable this option if the Extract trail is to be written directly to a remote Oracle GoldenGate Classic installation.

    For MySQL, setting this option enables the TRANLOGOPTIONS ALTLOGDEST REMOTE parameter to support a remote Extract, and is not related to trails.

    Oracle, MySQL

    Registration Information Section

    CSN

    Commit Sequence Number (CSN) value

    Oracle

    Share

    Choose the method to share the LogMiner data dictionary. Options are:
    • Automatic: This option allows the system to choose the method for sharing the dictionary .

    • None: Choosing this option, will not allow the dictionary to be shared.

    • Extract: Choose this option to allow sharing the logminer dictionary for specific Extract.

    Oracle

    Optimized

    Enable this option to optimize the Extract registration.

    Oracle

    Downstream Capture

    Enable this option to set up a downstream Extract for log mining.

    Oracle

    Register Only

    Use this option to just register the Extract and not add the Extract. The registration creates the replication slot when you register the Extract or use the Register Only option.

    PostgreSQL

    Source Database Credential

    Create new credential If you haven't set up your database login credentials, you can create and save the database login credentials from here. All
    Credential Domain Create a domain for the database. All
    Credential Alias Specifiy a credential for the database login. All
    User ID Specify a user name for logging into the database. All
    Password, Verify Password Enter the password used to login to the database and reenter the password to verify. All

    Credential Domain

    Saves the credential user under the specified domain name. Enables the same alias to be used by multiple Oracle GoldenGate installations that use the same credential store. The default domain is Oracle GoldenGate.

    All databases

    Credential Alias

    Specifies an alias for the user name. Use this option if you do not want the user name to be in a parameter file or command. If ALIAS is not used, the alias defaults to the user name, which then must be used in parameter files and commands where a login is required. You can create multiple entries for a user, each with a different alias, by using the ADD USER option with ALIAS.

    All databases

    Downstream Mining

    Mining Credential Domain Domain name of the downstream mining database. Oracle
    Mining Credential Alias Alias for the mining downstream database. Oracle
    No UserID Enable this option if there is no source database connection. Selecting this option enables the ADG fetch options. Oracle
    ADG Fetch Credential Domain Domain name for the ADG fetch database. Oracle
    ADG Fetch Credential Alias Domain alias for the ADG fetch database. Oracle
  4. (Optional) Enter the encryption profile description. If you have not created an encryption profile, then the Local Wallet profile would be selected by default.
    1. Select the profile name from the list box. You can select the Local Wallet or a custom profile.

    2. Select the encryption profile type from the list box.

    3. Specify the masterkey for the encryption profile. This option doesn't exist with SQL Server.

  5. (Optional) Enter the Managed Options while creating all types of Extract processes. The following table provides these options:
    Option Description

    Profile Name

    Provides the name of the autostart and autorestart profile. You can select the default or custom options.

    If you have already created a profile, then you can select that profile also. If you select the Custom option, then you can set up a new profile from this section itself.

    Critical to deployment health

    Enable this option to view Metrics on the Deployment Details page in the OCI Console.

    Auto Start

    Enables autostart for the process.

    Startup Delay

    Time to wait in seconds before starting the process

    Auto Restart

    Configures how to restart the process if it terminates

    Max Retries

    Specify the maximum number of retries to try to start the process

    Retry Delay

    Delay time in trying to start the process

    Retries Window The duration interval to try to start the process
    Restart on Failure only If true the task is only restarted if it failes
    Disable Task After Retries Exhausted If true then the task is disabled after exhausting all attempts to restart the process.
  6. Click Next.

  7. You can edit the parameter file in the text area to list the table details that you are interested in capturing. For example, table source.table1;

  8. You can select Register Extract in the background to register the Extract in the background asynchronously. This option is required for Oracle and PostgreSQL databases.

  9. Click Create and Run to create and start the Extract. If you select Create, the Extract is created but you need to start it using the Extract drop-down on the Overview page.

    You are returned to the Overview page of the Administration Service. Select the Action list if you want to look at the Extract details such as process information, checkpoint, statistics, parameters, and report.

Creating a Distribution Path

A Distribution Path sends the transaction of data from the Extract to the Replicat.

Note

If you're creating a Distribution Path from an on-premises Oracle GoldenGate to OCI GoldenGate, then the data transfer protocol must be WebSocket Secure (WSS).
To create a Distribution Path:
  1. From the Deployment Details page, launch and log in to the OCI GoldenGate deployment console.
  2. On the OCI GoldenGate Deployment Console dashboard, click Distribution Service.
  3. Click Add Path (+) on the Distribution Service home page.
  4. On the Add Path page, complete the fields as follows:
    Options Description

    Path Name

    Select a name for the path.

    Description

    Provide a description. For example, the name of the Extract and Replicat processes associated with the distribution path.

    Reverse proxy enabled?

    Select to use reverse proxy.

    Source: Trail Name

    Select the Extract name from the drop-down list, which populates the trail name automatically. If it doesn’t, enter the trail name that you provided while adding the Extract.

    Generated Source URI:

    A URI is automatically generated for the trail based on the Extract information you provided. You can edit this URI by clicking the pencil, then modifying the source. Typically, you will need to edit the URI if you want to use reverse proxy.

    Target Authentication Method

    Select the authentication method for the target URI.

    Authentication options are:

    OAuth: Use the OAuth if the source and target deployments are IDCS-enabled. This option uses the client credentials for authentication from the Distribution Service to the Receiver Service.

    Certificate: Choose a certificate from the drop-down. This certificate is created using the Certificate Management page in Service Manager. See How to Add and Manage Certificates for the Deployment.

    UserID Alias.

    Target

    Enter the target endpoint of the path.

    From the drop-down list, select your data transfer protocol. The default option is wss (secure web socket). Specify the following details when you select this option:

    • Target Host: Enter the URL of the target host, for example, localhost, if the target is on the same system.

    • Port Number: You may enter the port number of the Receiver Service and the trail name of the Replicat you created earlier. However, it’s not mandatory. The port is the Manager port number for Classic Architecture.

    • Trail Name: Path takes the source trail and sends the date to a target trail given here, which can be consumed by any Replicats created later.

    • Domain: Name of the target domain.

    • Alias: User alias of the target domain.

    You can also choose ogg or ws (web socket) protocol.

    For the ogg protocol, you need to specify only the target host, port number, and trail file name.

    For the ws protocol, the options are the same as the wss protocol.

    Generated Target URI

    A target URI is automatically generated for the trail based on the target authentication method and target you provided. You can edit this URI by clicking the pencil, then modifying the target.

    Target Encryption Algorithm

    Select the encryption algorithm for the target trail. Options include NONE, AES128, AES192, AES256.

    Enable Network Compression

    Set the compression threshold value if you enable this option.

    Compression Threshold

    Option appears when you enable the network compression. Specify the compresion threshold value.

    Sequence Length

    The length of the trail sequence number.

    Trail Size (MB)

    The maximum size of a file in a trail.

    Configure Trail Format

    Toggle this switch to enable and configure the trail file format.

    Type

    Select one of these types of trail file formats:
    • Plain Text

    • XML

    • SQL

    Compatible With

    Select the utility that is compatible with the trail file. Options are:
    • BCP

    • SQLLOADER

    • COMCAST

    Timestamp Precision

    Specify the timestamp precision value for the trail file.

    Extra Columns

    Includes placeholders for additional columns at the end of each record. Use this option when a target table has more columns than the source table.

    Specify a value between 1 and 9.

    Include SYSKEY

    Select this option incase your Replicat configuration includes tables with SYSKEY.

    Quote Style

    Select the quote style depending on the database requirements.

    Include Column Name?

    Enable this option to include column names in the trail file.

    Null Is Space?

    Select this option to indicate that any null values in the trail file is a space.

    Include Place Holder?

    Outputs a placeholder for missing columns.

    Include Header Fields?

    Select to include header fields in the trail file.

    Delimiter

    An alternative delimiter character.

    Use Qualified Name?

    Select to use the fully qualified name of the parameter file.

    Include Transaction Info?

    Enable to to include transaction information.

    Encryption Profile

    Section

    Begin

    Select the point from where you need to log data. You can select the following options from the drop-down list:

    • Now

    • Custom Time

    • Position is Log (default)

    Source Sequence Number

    Select the sequence number of the trail from source deployment Extract.

    Source RBA Offset

    This setting provides the Relative Byte Address (RBA) offset value which is the point in the trail file (in bytes) from where you want the process to start.

    Critical

    The default value is false. If set to true, this indicates that the distribution path is critical to the deployment.

    Auto Restart

    The default value is false. If set to true, the distribution path restarts automatically if it's terminated.

    Auto Restart Options

    Section

    Retries

    The number of times to try an restart the task (path process).

    Delay

    The duration interval to wait between retries.

    Rule Configuration Description
    Enable filtering

    If you enable filtering by selecting it from the toggle button and click the Add Rule button, you’ll see the Rule Definition dialog box.

    • Rule Name

    • Rule Action: Select either Exclude or Include

    • Filter Type: Select from the following list of options:

      • Object Type: Select from three object types: DML, DDL, and Procedure

      • Object Names: Select this option to provide an existing object name. A 3–part naming convention depends on whether you are using CDB. With CDB, you need to use a 3–part naming convention, otherwise a 2–part convention is mandatory. 3–part convention includes container, schema, object. 2–part convention includes schema, object name.

      • Procedure Feature Name: Select this option to filter, based on existing procedure feature name.

      • Column Based: If you select this option, you are presented with the option to enter the table and column name to which the rule applies. You can filter out using column value with LT, GT, EQ, LE, GE, NE conditions. You can also specify if you want to have before image or after image in filtered data.

      • Tag: Select this option to set the filter based on tags.

      • Chunk ID: Displays the configuration details of database shards, however, the details can’t be edited.

    • Negate: Select this check box if you need to negate any existing rule.

    You can also see the JSON script for the rule by clicking the JSON tab.

    Additional Options Description

    Eof Delay (cent sec)

    You can specify the Eof Delay in centiseconds. On Linux platforms, the default settings can be retained. However, on non-Linux platforms, you may need to adjust this setting for high bandwidth, high latency networks, or for networks that have Quality of Service (QoS) settings (DSCP and Time of Service (ToS) ).

    Checkpoint Frequency

    Frequency of the path that is taking the checkpoint (in seconds).

    TCP Flush Bytes

    Enter the TCP flush size in bytes.

    TCP Flush Seconds

    Enter the TCP flush interval in seconds.

    TCP Options

    Section

    DSCP

    Select the Differentiated Services Code Point (DSCP) value from the drop-down list, or search for it from the list.

    TOS

    Select the Type of service (TOS) value from the drop-down list.

    TCP_NODELAY

    Enable this option to prevent delay when using the Nagle’s option.

    Quick ACK

    Enable this option to send quick acknowledgment after receiving data.

    TCP_CORK

    Enable this option to allow using the Nagle’s algorithm cork option.

    System Send Buffer Size

    You can set the value for the send buffer size for flow control.

    System Receive Buffer Size

    You can set the value for the receive buffer size for flow control.

    Keep Alive

    Timeout for keep-alive.

  5. Click Create Path or Create and Run, as need.
After the path is created, you’ll see the new path on the Distribution Service Overview page.

Creating a Receiver Path

The Receiver Service handles all incoming trail files. The Receiver Service home page shows the condition of the distribution path with one end depicting the Extract and the other end, the Replicat.

Note

if you're creating a Receiver Path on an on premise Oracle GoldenGate from OCI GoldenGate, then the data transfer protocol must be WebSocket Secure (WSS).
To create a Receiver Path:
  1. From the Deployment Details page, launch and log in to the OCI GoldenGate Deployment Console.
  2. On the OCI GoldenGate deployment console dashboard, click Receiver Service.
  3. Click Add Path (+) on the Receiver Service home page.
  4. On the Add Path page, complete the required fields for Path.
    Options Description

    Path Name

    Select a name for the path.

    Description

    Provide a description. For example, the name of the Extract and Replicat processes associated with the distribution path.

    Reverse proxy enabled?

    Select to use reverse proxy.

    Source: Trail Name

    Select the Extract name from the drop-down list, which populates the trail name automatically. If it doesn’t, enter the trail name that you provided while adding the Extract.

    Generated Source URI:

    A URI is automatically generated for the trail based on the Extract information you provided. You can edit this URI by clicking the pencil, then modifying the source. Typically, you will need to edit the URI if you want to use reverse proxy.

    Target Authentication Method

    Select the authentication method for the target URI.

    Authentication options are:

    OAuth: Use the OAuth if the source and target deployments are IDCS-enabled. This option uses the client credentials for authentication from the Distribution Service to the Receiver Service.

    Certificate: Choose a certificate from the drop-down. This certificate is created using the Certificate Management page in Service Manager. See How to Add and Manage Certificates for the Deployment.

    UserID Alias.

    Target

    Enter the target endpoint of the path.

    From the drop-down list, select your data transfer protocol. The default option is wss (secure web socket). Specify the following details when you select this option:

    • Target Host: Enter the URL of the target host, for example, localhost, if the target is on the same system.

    • Port Number: You may enter the port number of the Receiver Service and the trail name of the Replicat you created earlier. However, it’s not mandatory. The port is the Manager port number for Classic Architecture.

    • Trail Name: Path takes the source trail and sends the date to a target trail given here, which can be consumed by any Replicats created later.

    • Domain: Name of the target domain.

    • Alias: User alias of the target domain.

    You can also choose ogg or ws (web socket) protocol.

    For the ogg protocol, you need to specify only the target host, port number, and trail file name.

    For the ws protocol, the options are the same as the wss protocol.

    Generated Target URI

    A target URI is automatically generated for the trail based on the target authentication method and target you provided. You can edit this URI by clicking the pencil, then modifying the target.

    Target Encryption Algorithm

    Select the encryption algorithm for the target trail. Options include NONE, AES128, AES192, AES256.

    Enable Network Compression

    Set the compression threshold value if you enable this option.

    Compression Threshold

    Option appears when you enable the network compression. Specify the compresion threshold value.

    Sequence Length

    The length of the trail sequence number.

    Trail Size (MB)

    The maximum size of a file in a trail.

    Configure Trail Format

    Toggle this switch to enable and configure the trail file format.

    Type

    Select one of these types of trail file formats:
    • Plain Text

    • XML

    • SQL

    Compatible With

    Select the utility that is compatible with the trail file. Options are:
    • BCP

    • SQLLOADER

    • COMCAST

    Timestamp Precision

    Specify the timestamp precision value for the trail file.

    Extra Columns

    Includes placeholders for additional columns at the end of each record. Use this option when a target table has more columns than the source table.

    Specify a value between 1 and 9.

    Include SYSKEY

    Select this option incase your Replicat configuration includes tables with SYSKEY.

    Quote Style

    Select the quote style depending on the database requirements.

    Include Column Name?

    Enable this option to include column names in the trail file.

    Null Is Space?

    Select this option to indicate that any null values in the trail file is a space.

    Include Place Holder?

    Outputs a placeholder for missing columns.

    Include Header Fields?

    Select to include header fields in the trail file.

    Delimiter

    An alternative delimiter character.

    Use Qualified Name?

    Select to use the fully qualified name of the parameter file.

    Include Transaction Info?

    Enable to to include transaction information.

    Encryption Profile

    Section

    Begin

    Select the point from where you need to log data. You can select the following options from the drop-down list:

    • Now

    • Custom Time

    • Position is Log (default)

    Source Sequence Number

    Select the sequence number of the trail from source deployment Extract.

    Source RBA Offset

    This setting provides the Relative Byte Address (RBA) offset value which is the point in the trail file (in bytes) from where you want the process to start.

    Critical

    The default value is false. If set to true, this indicates that the distribution path is critical to the deployment.

    Auto Restart

    The default value is false. If set to true, the distribution path restarts automatically if it's terminated.

    Auto Restart Options

    Section

    Retries

    The number of times to try an restart the task (path process).

    Delay

    The duration interval to wait between retries.

    Rule Configuration Description
    Enable filtering

    If you enable filtering by selecting it from the toggle button and click the Add Rule button, you’ll see the Rule Definition dialog box.

    • Rule Name

    • Rule Action: Select either Exclude or Include

    • Filter Type: Select from the following list of options:

      • Object Type: Select from three object types: DML, DDL, and Procedure

      • Object Names: Select this option to provide an existing object name. A 3–part naming convention depends on whether you are using CDB. With CDB, you need to use a 3–part naming convention, otherwise a 2–part convention is mandatory. 3–part convention includes container, schema, object. 2–part convention includes schema, object name.

      • Procedure Feature Name: Select this option to filter, based on existing procedure feature name.

      • Column Based: If you select this option, you are presented with the option to enter the table and column name to which the rule applies. You can filter out using column value with LT, GT, EQ, LE, GE, NE conditions. You can also specify if you want to have before image or after image in filtered data.

      • Tag: Select this option to set the filter based on tags.

      • Chunk ID: Displays the configuration details of database shards, however, the details can’t be edited.

    • Negate: Select this check box if you need to negate any existing rule.

    You can also see the JSON script for the rule by clicking the JSON tab.

    Additional Options Description

    Eof Delay (cent sec)

    You can specify the Eof Delay in centiseconds. On Linux platforms, the default settings can be retained. However, on non-Linux platforms, you may need to adjust this setting for high bandwidth, high latency networks, or for networks that have Quality of Service (QoS) settings (DSCP and Time of Service (ToS) ).

    Checkpoint Frequency

    Frequency of the path that is taking the checkpoint (in seconds).

    TCP Flush Bytes

    Enter the TCP flush size in bytes.

    TCP Flush Seconds

    Enter the TCP flush interval in seconds.

    TCP Options

    Section

    DSCP

    Select the Differentiated Services Code Point (DSCP) value from the drop-down list, or search for it from the list.

    TOS

    Select the Type of service (TOS) value from the drop-down list.

    TCP_NODELAY

    Enable this option to prevent delay when using the Nagle’s option.

    Quick ACK

    Enable this option to send quick acknowledgment after receiving data.

    TCP_CORK

    Enable this option to allow using the Nagle’s algorithm cork option.

    System Send Buffer Size

    You can set the value for the send buffer size for flow control.

    System Receive Buffer Size

    You can set the value for the receive buffer size for flow control.

    Keep Alive

    Timeout for keep-alive.

  5. Click Create Path or Create and Run, as needed.
After the path is created, you'll see the path on the Receiver Service Overview page.

Creating a Checkpoint Table

Before you create a Replicat, you must create a checkpoint table.

To create a checkpoint table:
  1. In the navigation menu, click Configuration.
  2. In the Administration Service tab, go to the Database tab.
  3. Click the database connect icon for the target database.
  4. Click Add Checkpoint (+).
  5. For Checkpoint Table, enter the target schema name, and then click Submit.
  6. Reconnect to the target database.
The Checkpoint Table displays your target schema.

Creating a Replicat

Before you create a Replicat, ensure that you first create a checkpoint table.
To create a Replicat:
  1. On the Administration Service home page, click Add Replicat (+).
  2. Select a Replicat type, and then click Next.
    Note

    Some Replicat types are only available for certain databases. All Replicat types may not be applicable to your database.

    The types of Replicats are:

    • Integrated Replicat
    • Nonintegrated Replicat
    • Coordinated Replicat
    • Parallel Replicat

    For more information about the different Replicat types, see Choosing Capture and Apply Modes.

  3. Enter the required Replicat options on the Replicat Options page and click Next. To know more about the Replicat options, see the online help.
  4. For managed processes, the options to enter are:
    Option Description

    Profile Name

    Provides the name of the autostart and autorestart profile. You can select the default or custom options.

    If you have already created a profile, then you can select that profile also. If you select the Custom option, then you can set up a new profile from this section itself.

    Critical to deployment health

    (Oracle only) Enable this option if the profile is critical for the deployment health.
    Note

    This option only appears while creating the Extract or Replicat and not when you set up the managed processes in the Profiles page.

    Auto Start

    Enables autostart for the process.

    Startup Delay

    Time to wait in seconds before starting the process

    Auto Restart

    Configures how to restart the process if it terminates

    Max Retries

    Specify the maximum number of retries to try to start the process

    Retry Delay

    Delay time in trying to start the process

    Retries Window The duration interval to try to start the process
    Restart on Failure only If true the task is only restarted if it failes
    Disable Task After Retries Exhausted If true then the task is disabled after exhausting all attempts to restart the process.
  5. Click Create and Run to create and run the Replicat.

Stopping Extracts and Replicats

To stop a running Extract or Replicat, on the Administration Service Overview page, select Stop from the Actions menu of the process you want to stop. You can also select Stop (in the background) if the process was started using a background process.

Managing Trail Files

OCI GoldenGate Trail files quickly add up over time. Without purge tasks in place to manage these trail files, daily backups will take exponentially longer to complete and use compute resources that could otherwise be used elsewhere.

To purge OCI GoldenGate Trail files:
  1. Create a manual backup to view Trail files.
    1. On the Deploment Details page, under Resources, click Deployment Backups.
    2. Click Create Backup.
    3. Complete the fields in the Create Backup panel, and then click Create Backup.
      Note

      For Object name, you can enter a file name and extension, for example, backup.zip.
    4. From the Deployment Backup Details page, click Download.
    5. Review the contents of the downloaded backup file (<deployment-name>/var/lib/data/).
  2. Review current OCI GoldenGate processes.
    1. In the OCI GoldenGate Deployment Console, review the following processes that generate Trail files, and take note of the Trail files you want to keep:
      • In the Administration Service, review the details of each Extract. (Click the Extract name, and then select Details.)
      • In the Receiver Service, review the details of each Receiver Path (if any).

    All other Trail files not on your list can be purged.

  3. Set up Purge Tasks to clean up unused Trail files.
    1. In the OCI GoldenGate Deployment Console, open the navigation menu (hamburger icon) for the Administration Service, and then select Configuration.
    2. On the Configuration page, click Tasks, and then click Purge Trails.
    3. Click Add Purge Trails Task (plus icon).
    4. Under Create a new Purge Trails task, complete the following fields, and then click Submit:
      1. For Operation Name, enter a name for the purge task.
      2. For Trail, enter a name of a Trail file, and then click Add Trail (plus icon). Repeat this step to add more Trail files. Selected Trails populates with the names of the Trail files as you add them.
      3. Keep Use Checkpoints enabled if you want to purge after all Extract and Replicat processes are finished with the file(s), as indicated by checkpoints. Disabling this option allows purging without considering checkpoints and a minimum of one file (if no MIN value is specified) or the number of files specifed with MIN are kept.
      4. For Keep Rule, specify the Hours, Days, or Number of Files to keep.
      5. For Purge Frequency, specify the frequency to run this purge task.

    You can add more Purge Tasks or disable them as needed.

  4. Clean up unused Extract Trail files using REST APIs.

    Ensure that you first create a manual backup (see Task 1). You can easily purge Trail files using a REST API call to the OCI GoldenGate deployment:

    curl <console url> -u <username>:<password> -X POST -H 'Content-Type: application/json' -d 
    '{ 
        "trails": [ 
            {
                "name": "<one or two character trail prefix>"
            } 
        ], 
        "keep": [
            { 
                "type": "min", 
                "units": "<days | hours | files>", 
                "value": <number of units" 
            }
         ], 
        "name":"purge", 
        "purgeType": "trails", 
        "useCheckpoints": true | false 
    }'

    The following examples show how to remove Trail files under different conditions:

    Example 4-1: This example removes all Extract Trail keep files from the last 10 hours:

    curl -X POST https://<domain-name>/services/v2/commands/execute -n -H 'Content-Type: application/json' -d 
    '{
        "name": "purge",
        "purgeType": "trails",
        "trails": [
            {
                "name": "L1"
            }
        ],
        "useCheckpoints": false,
        "keep": [
            {
                "type": "min",
                "units": "hours",
                "value": 10
            }
        ]
    }'

    Example 4-2: This example removes all Extract Trail file using USECHECKPOINTS:

    curl -X POST https://<domain-name>/services/v2/commands/execute -n -H 'Content-Type: application/json' -d 
    '{
        "name": "purge",
        "purgeType": "trails",
        "trails": [
            {
                "name": "L1"
            }
        ],
        "useCheckpoints": true,
        "keep": [
            {
                "type": "min",
                "units": "days",
                "value": 1
            }
        ]
    }'

    Example 4-3: This example removes L1 Extract Trail files more than a day old:

    curl -X POST https://<domain-name>/services/v2/commands/execute -n -H 'Content-Type: application/json' -d 
    '{
        "name": "purge",
        "purgeType": "trails",
        "trails": [
            {
                "name": "L1"
            }
        ],
        "useCheckpoints": false,
        "keep": [
            {
                "type": "min",
                "units": "day",
                "value": 23
            }
        ]
    }'

    Example 4-4: This example removes all L1 Extract Trail files:

    curl -X POST https://<domain-name>/services/v2/commands/execute -n -H 'Content-Type: application/json' -d 
    '{
        "name": "purge",
        "purgeType": "trails",
        "trails": [
            {
                "name": "L1"
            }
        ],
        "useCheckpoints": false,
        "keep": [
            {
                "type": "min",
                "units": "files",
                "value": 0
            }
        ]
    }'
    Note

    Using the curl option, -n, pulls the login password from the .netrc file located in the home directory and ensures that the username and password are not passed through the command line.
  5. Clean up unused Initial Load Extract or Receiver Path Trail files using REST APIs.
    Here are some examples:

    Example 5-1: This example purges all Trail files whose names match "IL":

    curl -X POST https://<domain-name>/services/v2/commands/execute -n -H 'Content-Type: application/json' -d 
    '{
        "name": "purge",
        "purgeType": "trails",
        "trails": [
            {
                "name": "IL"
            }
        ],
        "useCheckpoints": false,
        "keep": [
            {
                "type": "min",
                "units": "files",
                "value": 0
            }
        ]
    }'

    Example 5-2: This example purges all Trail files, as indicated by the asterisk (*), within the subdirectory, demo:

    curl -X POST https://<domain-name>/services/v2/commands/execute -n -H 'Content-Type: application/json' -d 
    '{
        "name": "purge",
        "purgeType": "trails",
        "trails": [
            {
                "name": "*",
                "path": "/u02/Deployment/var/lib/data/demo"
            }
        ],
        "useCheckpoints": false,
        "keep": [
            {
                "type": "min",
                "units": "files",
                "value": 0
            }
        ]
    }'

    To ensure active Trail files are kept, run this script for each combination of Trail files you want to keep.

    To ensure all Trail files are deleted, create another manual backup and check the contents of the backup for the Trail files you wanted to keep. Note the aggregate size reduction and speed that the backup now completes.