Migrate from Oracle Database to Amazon RDS for PostgreSQL by using Oracle GoldenGate
Created by Dhairya Jindani (AWS), Rajeshkumar Sabankar (AWS), and Sindhusha Paturu (AWS)
Environment: PoC or pilot | Source: Databases: Relational | Target: Amazon RDS for PostgreSQL |
R Type: Re-architect | Workload: Oracle | Technologies: Migration; Databases |
AWS services: Amazon RDS |
Summary
This pattern shows how to migrate an Oracle database to Amazon Relational Database Service (Amazon RDS) for PostgreSQL by using Oracle Cloud Infrastructure (OCI) GoldenGate.
By using Oracle GoldenGate, you can replicate data between your source database and one or more destination databases with minimal downtime.
Note: The source Oracle database can be either on-premises or on an Amazon Elastic Compute Cloud (Amazon EC2) instance. You can use a similar procedure when using on-premises replication tools.
Prerequisites and limitations
Prerequisites
An active AWS account
An Oracle GoldenGate license
Java Database Connectivity (JDBC) driver to connect to the PostgreSQL database
Schema and tables created with the AWS Schema Conversion Tool (AWS SCT)
on the target Amazon RDS for PostgreSQL database
Limitations
Oracle GoldenGate can replicate existing table data (initial load) and ongoing changes (change data capture) only
Product versions
Oracle Database Enterprise Edition 10g or newer versions
Oracle GoldenGate 12.2.0.1.1 for Oracle or newer versions
Oracle GoldenGate 12.2.0.1.1 for PostgreSQL or newer versions
Architecture
The following diagram shows an example workflow for migrating an Oracle database to Amazon RDS for PostgreSQL by using Oracle GoldenGate:
The diagram shows the following workflow:
The Oracle GoldenGate Extract process
runs against the source database to extract data. The Oracle GoldenGate Replicat process
delivers the extracted data to the target Amazon RDS for PostgreSQL database.
Tools
Oracle GoldenGate
helps you design, run, orchestrate, and monitor your data replication and stream data processing solutions in the Oracle Cloud Infrastructure. Amazon Relational Database Service (Amazon RDS) for PostgreSQL helps you set up, operate, and scale a PostgreSQL relational database in the AWS Cloud.
Epics
Task | Description | Skills required |
---|---|---|
Download Oracle GoldenGate. | Download the following versions of Oracle GoldenGate:
To download the software, see Oracle GoldenGate Downloads | DBA |
Install Oracle GoldenGate for Oracle on the source Oracle Database server. | For instructions, see the Oracle GoldenGate documentation | DBA |
Install Oracle GoldenGate for PostgreSQL database on the Amazon EC2 instance. | For instructions, see the Oracle GoldenGate documentation | DBA |
Task | Description | Skills required |
---|---|---|
Set up Oracle GoldenGate for Oracle Database on the source database. | For instructions, see the Oracle GoldenGate documentation Make sure that you configure the following:
| DBA |
Set up Oracle GoldenGate for PostgreSQL on the target database. | For instructions, see Part VI Using Oracle GoldenGate for PostgreSQL Make sure that you configure the following:
| DBA |
Task | Description | Skills required |
---|---|---|
Set up the Extract process in the source database. | In the source Oracle Database, create an extract file to extract data. For instructions, see ADD EXTRACT Note: The extract file includes the creation of the extract parameter file and trail file directory. | DBA |
Set up a data pump to transfer the trail file from the source to the target database. | Create an EXTRACT parameter file and trail file directory by following the instructions in PARFILE For more information, see What is a Trail? | DBA |
Set up replication on the Amazon EC2 instance. | Create a replication parameter file and trail file directory. For more information about creating replication parameter files, see section 3.5 Validating a parameter file For more information about creating a trail file directory, see Creating a trail Important: Make sure that you add a checkpoint table entry in the GLOBALS file at the target. For more information, see What is a Replicat? | DBA |
Task | Description | Skills required |
---|---|---|
In the source database, create a parameter file to extract data for the initial load. | Follow the instructions in Creating a parameter file in GGSCI Important: Make sure that the Manager is running on the target. | DBA |
In the target database, create a parameter file to replicate data for the initial load. | Follow the instructions in Creating a parameter file in GGSCI Important: Make sure that you add and start the Replicat process. | DBA |
Task | Description | Skills required |
---|---|---|
Stop the Replicat process and make sure that the source and target databases are in sync. | Compare row counts between the source and target databases to make sure that the data replication was successful. | DBA |
Configure data definition language (DDL) support. | Run the DDL script for creating triggers, sequence, synonyms, and referential keys on PostgreSQL. Note: You can use any standard SQL client application to connect to a database in your DB cluster. For example, you can use pgAdmin | DBA |
Related resources
Amazon RDS for PostgreSQL (Amazon RDS User Guide)
Oracle GoldenGate supported processing methods and databases
(Oracle documentation)