This topic describes how to migrate data from a self-managed Oracle database to a self-managed PostgreSQL database by using Data Transmission Service (DTS). DTS supports schema migration, full data migration, and incremental data migration. When you migrate data from a self-managed Oracle database, you can select all of the supported migration types to ensure service continuity.
Prerequisites
- The engine version of the self-managed Oracle database is 9i, 10g, 11g, 12c, 18c, or 19c.
- The self-managed Oracle database is running in ARCHIVELOG mode. Archived log files are accessible, and a suitable retention period is set for archived log files. For more information, see Managing Archived Redo Log Files.
- Supplemental logging is enabled for the self-managed Oracle database. The SUPPLEMENTAL_LOG_DATA_PK and SUPPLEMENTAL_LOG_DATA_UI parameters are set to Yes. For more information, see Supplemental Logging.
- The tables to be migrated from the self-managed Oracle database contain primary keys or UNIQUE NOT NULL indexes.
- A self-managed PostgreSQL database is created.
Limits
Category | Description |
---|---|
Limits on the source database |
|
Other limits |
|
Billing
Migration type | Task configuration fee | Internet traffic fee |
---|---|---|
Schema migration and full data migration | Free of charge. | Charged only when data is migrated from Alibaba Cloud over the Internet. For more information, see Billing overview. |
Incremental data migration | Charged. For more information, see Billing overview. |
Migration types
Migration type | Description |
---|---|
Schema migration | DTS migrates the schemas of the required objects from the source database to the destination
PostgreSQL database. DTS supports schema migration for the following types of objects:
table, view, synonym, trigger, stored procedure, stored function, package, and user-defined
type.
Note In this scenario, DTS does not support triggers. We recommend that you delete the
triggers of the source database to prevent data inconsistency caused by triggers.
For more information, see Configure a data synchronization task for a source database that contains a trigger.
|
Full data migration | DTS migrates the historical data from the source self-managed Oracle database to the
destination PostgreSQL database.
Note During schema migration and full data migration, do not perform DDL operations on
the objects to be migrated. Otherwise, the objects may fail to be migrated.
|
Incremental data migration | After full data migration is complete, DTS retrieves redo log files from the self-managed
Oracle database. Then, DTS replicates incremental data from the Oracle database to
the destination PostgreSQL database.
Incremental data migration allows you to ensure service continuity when you migrate data from the self-managed Oracle database to the destination PostgreSQL database. |
SQL operations that can be migrated
Operation type | SQL statement |
---|---|
DML | INSERT, UPDATE, and DELETE |
DDL |
|
Preparations
Log on to the self-managed Oracle database, create an account that you want to use to collect data, and then grant permissions to the account.
Database | Schema migration | Full data migration | Incremental data migration |
---|---|---|---|
Self-managed Oracle database | Permissions of the schema owner | Permissions of the schema owner | Database administrator (DBA) |
Self-managed PostgreSQL database | Permissions of the schema owner |
To create a database account and grant permissions to the database account, perform the following operations:
-
Self-managed Oracle database: CREATE USER and GRANT
- Self-managed PostgreSQL database: CREATE USER and GRANT