This topic describes how to migrate data from a self-managed Oracle database to an AnalyticDB for PostgreSQL instance by using Data Transmission Service (DTS).
Prerequisites
- The 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, including SUPPLEMENTAL_LOG_DATA_PK and SUPPLEMENTAL_LOG_DATA_UI, is enabled for the self-managed Oracle database. For more information, see Supplemental Logging.
- An AnalyticDB for PostgreSQL instance is created. For more information, see Create an AnalyticDB for PostgreSQL instance.
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 Pricing. |
Incremental data migration | Charged. For more information, see Pricing. |
Precautions
- During full data migration, DTS uses read and write resources of the source and destination databases. This may increase the loads of the database servers. Before you migrate data, evaluate the impact of data migration on the performance of the source and destination databases. We recommend that you migrate data during off-peak hours.
- If a data migration task fails, DTS automatically resumes the task. Before you switch your workloads to the destination database, stop or release the data migration task. Otherwise, the data in the source database will overwrite the data in the destination database after the task is resumed.
- If the self-managed Oracle database is deployed in a Real Application Cluster (RAC)
architecture and is connected to DTS over an Alibaba Cloud virtual private cloud (VPC),
you must connect the Single Client Access Name (SCAN) IP address of the Oracle RAC
and the virtual IP address (VIP) of each node to the VPC and configure routes. The
settings ensure that your DTS task can run as expected. For more information, see
Configure a route between DTS and Express Connect, VPN Gateway, or Smart Access Gateway.
Notice When you configure the source Oracle database in the DTS console, you can specify the SCAN IP address of the Oracle RAC as the database endpoint or IP address.
Migration types
Migration type | Description |
---|---|
Schema migration | DTS migrates the schemas of the required objects from the source database to the destination
database. DTS supports schema migration for the following types of objects: table,
index, constraint, function, sequence, and view.
Warning
|
Full data migration | DTS migrates historical data of the required objects from the source database to the
destination database.
Note During schema migration and full data migration, we recommend that you do not perform
data definition language (DDL) operations on the required objects. Otherwise, the
objects may fail to be migrated.
|
Incremental data migration | After full data migration is complete, DTS retrieves redo log files from the source
Oracle database. Then, DTS migrates incremental data from the source Oracle database
to the destination database in real time.
DTS can synchronize the following SQL operations during incremental data migration:
Incremental data migration allows you to ensure service continuity when you migrate data from a self-managed Oracle database. |
Permissions required for database accounts
Database | Schema migration | Full data migration | Incremental data migration |
---|---|---|---|
Self-managed Oracle database | The permissions of the schema owner | The permissions of the schema owner | The database administrator (DBA) permission |
AnalyticDB for PostgreSQL | The read and write permissions on the destination database | The read and write permissions on the destination database | The read and write permissions on the destination database |
For more information about how to create and authorize a database account, see the following topics:
- Self-managed Oracle database: CREATE USER and GRANT
- AnalyticDB for PostgreSQL: Configure an account
Enable logging and grant fine-grained permissions to an Oracle database account