Use The AWS Management Console To Do The Following:: o o o o o
Use The AWS Management Console To Do The Following:: o o o o o
This walkthrough gets you started with heterogeneous database migration from Oracle to Amazon RDS
for PostgreSQL. To automate the migration, we use the AWS DMS Schema Conversion. This service helps
assess the complexity of your migration and converts source Oracle database schemas and code objects
to a format compatible with PostgreSQL. Then, you apply the converted code to your target database.
This introductory exercise shows how you can use DMS Schema Conversion for this migration.
o Create your target Amazon RDS for PostgreSQL database in the Amazon RDS console.
o Assess the migration complexity and review the migration action items.
This walkthrough takes approximately three hours to complete. Make sure that you delete resources at
the end of this walkthrough to avoid additional charges.
Topics
Migration overview
Prerequisites for migrating Oracle databases to Amazon Aurora MySQL with DMS schema
conversion
Step-by-step Oracle databases to Amazon Aurora MySQL with DMS schema conversion migration
walkthrough
Migration from Oracle databases to Amazon Aurora MySQL with DMS schema conversion next
steps
Migration overview
This section provides high-level guidance for customers looking to migrate from Oracle to
PostgreSQL using DMS Schema Conversion.
DMS Schema Conversion automatically converts your source Oracle database schemas and
most of the database code objects to a format compatible with PostgreSQL. This conversion
includes tables, views, stored procedures, functions, data types, synonyms, and so on. Any
objects that DMS Schema Conversion can’t convert automatically are clearly marked. To
complete the migration, you can convert these objects manually.
At a high level, DMS Schema Conversion operates with the following three components:
instance profiles, data providers, and migration projects.
An instance profile specifies network and security settings.
A data provider stores database connection credentials.
A migration project contains data providers, an instance profile, and migration rules.
AWS DMS uses data providers and an instance profile to design a process that converts
database schemas and code objects.
The following diagram illustrates the DMS Schema Conversion process.
https://docs.aws.amazon.com/dms/latest/sbs/chap-rdsoracle2postgresql.steps.convertschema.html
https://docs.aws.amazon.com/dms/latest/sbs/chap-manageddatabases.postgresql-rds-postgresql-full-
load-pd_dump.html
pg_dump and pg_restore is a native PostgreSQL client utility. You can find this utility as part of the
database installation. It produces a set of SQL statements that you can run to reproduce the original
database object definitions and table data.
The pg_dump and pg_restore utility is suitable for the following use cases if:
The pg_dump and pg_restore utility may not be suitable for the following use cases if:
Example
At a high level, you can use the following steps to migrate the dms_sample database.
Export Data
You can use the following command to create dump files for your source database.
-h is the name of source server where you would like to migrate your database.
-Fc: Sets the output as a custom-format archive suitable for input into pg_restore.
-b: Include large objects in the dump.
-h is the name of target server where you would like to migrate your database.
You can use the following command to import the dump file into your Amazon RDS instance.
-h is the name of target server where you would like to migrate your database.
<dumpfilelocation.sql> is the dump file that was created to generate the script of the database using
pg_dump
To export such database objects as roles and users, you can use the pg_dumpall utility.
To generate a script for users and roles, run the following command on the source database.
-h is the name of source server where you would like to migrate your database.
To restore users and roles, run the following command on your target database.
-h is the name of target server where you would like to migrate your database.
To complete the export and import operations, the pg_dump and pg_restore requires some time. This
time depends on the following parameters.
The resources that you provision for your instance used to invoke pg_dump and pg_restore.
https://docs.aws.amazon.com/dms/latest/oracle-to-aurora-postgresql-migration-playbook/chap-oracle-
aurora-pg.hadr.datapump.html