3 Performing Migration Tasks

Since OCI GoldenGate is a fully managed cloud service, you can't migrate Trail and other Oracle GoldenGate configuration files (like Param files) to the OCI GoldenGate deployment. You'll start fresh with OCI GoldenGate. You can, however, work in sync with the Oracle GoldenGate instance you're migrating and the new OCI GoldenGate deployment so that no data is lost during migration. To migrate Oracle GoldenGate to OCI GoldenGate, drain all active open transactions from your source database to the Trail file using the Oracle GoldenGate instance you're migrating, and then switch to the new OCI GoldenGate deployment.

Creating a Deployment

OCI GoldenGate deployments are similar to your full on premise Oracle GoldenGate Microservices or Classic architecture installation's deployments.

For every one Oracle GoldenGate instance that you're migrating, create an equivalent OCI GoldenGate deployment. You may also choose to create OCI GoldenGate deployments for each replication environment architecture needed.

For more information, see Deployments.

Registering the Database

A database registration is an OCI resource that OCI GoldenGate uses to establish networking and connectivity to a source or target database. When you register a database, OCI GoldenGate creates a private network connection between OCI GoldenGate and your tenancy VCN (where your database resides). Database registrations also capture and synchronize database credentials to the OCI GoldenGate deployment. Any changes made to the credentials, such as updating or deleting, is synchronized to OCI GoldenGate.

Ensure that you register all your source and target databases in OCI GoldenGate using the same credentials used with the Oracle GoldenGate instance you're migrating.

For more information, see Database Registrations.

Migrating Extracts

After you register databases and create the necessary OCI GoldenGate deployments, the next important step is to migrate the Extracts from the Oracle GoldenGate instance that you're migrating.

As a fully managed service, OCI GoldenGate is inaccessible by a root user. Trail files and configuration files can't simply be copied into the OCI GoldenGate deployment. To migrate these files, you must first drain all active open transactions in the Trail file of the Oracle GoldenGate instance you're migrating, and then replicate these transactions into the target database.

Perform the following steps for each Change Data Capture (CDC) Extract that you have in the Oracle GoldenGate instance you're migrating. Ensure that you perform the migration steps for all Extracts and Replicats in the same application or database.

  1. Add and run a new Extract in the OCI GoldenGate Deployment Console to capture the same tables that you're capturing with the Oracle GoldenGate instance you're migrating. Ensure that you copy the Extract file parameters to the new Extract in the OCI GoldenGate Deployment Console.

    Note:

    Classic Extract is not supported in OCI GoldenGate. You must switch to Integrated Extract. For more information, see step 3 under Performing Pre-Migration Tasks.

  2. Ensure the Extract is running and capturing data, and that the Trail file is filled with data.
  3. Force the source database to archive logs:
    alter system archive log current
  4. Query the source database to determine the current SCN and take note of the number:
    select current_scn from v$database
  5. In the Oracle GoldenGate instance that you're migrating, run the following commands:
    info extract [name], showch
    Review the timestamps displayed under "Recovery Checkpoint" and "Current Checkpoint" and check that the time difference is less than one hour. If the time difference greater than one hour, step 6 will take longer to complete.
    send extract [name] showtrans

    This command returns the oldest open transaction tracked by Extract. Take note of the SCN returned. If the result is empty, repeat step 5 and take note of the recovery checkpoint SCN.

  6. Wait a few minutes and then repeat step 5 until the oldest open transaction SCN required is higher than the current_scn values obtained in step 4.

    Note:

    If this condition is not met, you need to consider committing the open transactions in your source database so that you can move forward with the migration.

  7. At this point, the Oracle GoldenGate instance you're migrating successfully captured all open transactions that weren't captured by the OCI GoldenGate Extract. These transactions applied by the Replicat in the Oracle GoldenGate instance you're migrating to the target database. You can now stop the Oracle GoldenGate instance:
    stop extract [name], force
  8. Check and take note of the Extract of the Oracle GoldenGate instance you're migrating's current checkpoint SCN:
    info extract [name], showch

Migrating Data Pump Extracts

This step is optional. If you don't use Data Pump Extract in the Oracle GoldenGate instance that you're migrating, you can proceed to the next migration task.

Perform the following steps for each Data Pump Extract in the Oracle GoldenGate instance that you're migrating:

  1. When the Data Pump Extract is at end of file, enter the following command:
    send extract [name], status
  2. Stop the Data Pump Extract.
  3. Add and run a Distribution Path to replace the Data Pump Extract process.

    Note:

    Carefully review the limitations and differences between Data Pump Extract and Distribution Paths. If you're using a Data Pump Extract to query or filter data, then the queries must be moved to TRANLOG Extract and filtering moved to TRANLOG Extract or Replicat.

Migrating Replicats

Perform the following steps for each Change Data Capture Replicat in the Oracle GoldenGate instance that you're migrating:

  1. Run the following command to check if Replicat process is at end of file:
    send replicat [name], status
  2. After the Replicat process reaches end of file, stop the Replicat. Ensure that it stops gracefully. If it doesn't stop gracefully, you must run the synchronize replicat command.
  3. Add a new Replicat process in the OCI GoldenGate Deployment Console. Ensure that it reads from the new Trail file generated by the OCI GoldenGate Extract or Data Pump Extract. Don't run the Replicat yet.
  4. In the OCI GoldenGate Deployment Console, position the Replicat to the SCN retrieved from the Extract current checkpoint obtained in Step 8 of Migrating Extracts, and then start the Replicat:
    start replicat [name], aftercsn <scn>

    Note:

    If you have multiple Extract/Replicat pairs, ensure that you use the correct corresponding SCN.