PolarDB is a next-generation relational database service that is developed by Alibaba Cloud. It is compatible with MySQL, PostgreSQL, and Oracle database engines. PolarDB provides superior performance in storage and computing to meet diverse requirements of enterprises. This topic describes how to migrate data from a self-managed Oracle database to a PolarDB for Oracle cluster 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.
- The tables to be migrated from the self-managed Oracle database contain primary keys or UNIQUE NOT NULL indexes.
Precautions
- DTS uses read and write resources of the source and destination databases during full data migration. This may increase the loads of the database servers. If the database performance is unfavorable, the specification is low, or the data volume is large, database services may become unavailable. For example, DTS occupies a large amount of read and write resources in the following cases: a large number of slow SQL queries are performed on the source database, the tables have no primary keys, or a deadlock occurs in the destination database. 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. For example, you can migrate data when the CPU utilization of the source and destination databases is less than 30%.
- 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 from the source database will overwrite the data in the destination database after the task is resumed.
- If the version of your Oracle database is 12c or later, the names of the tables to be migrated cannot exceed 30 bytes in length.
- 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.
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. |
Migration types
Migration type | Description |
---|---|
Schema migration | DTS migrates the schemas of the required objects from the source database to the destination
PolarDB for Oracle cluster (PolarDB cluster in short). DTS supports schema migration
for the following types of objects: table, view, synonym, trigger, stored procedure,
function, package, and user-defined type.
Note In this scenario, DTS is incompatible with triggers. If an object contains triggers,
data will become inconsistent between the source and destination databases.
|
Full data migration | DTS migrates historical data of the required objects from the source database to the
destination PolarDB cluster.
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 | DTS retrieves redo log files from the self-managed Oracle database. Then, DTS synchronizes
incremental data from the self-managed Oracle database to the destination PolarDB
cluster.
Incremental data migration allows you to ensure service continuity when you migrate data from the self-managed Oracle database to the destination PolarDB cluster. |
Before you begin
Log on to the source Oracle database, create an account for data collection, and grant permissions to the account.
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 | Database administrator (DBA) |
PolarDB cluster | The permissions of the schema owner | The permissions of the schema owner | The permissions of the schema owner |
For more information about how to create and authorize a database account, see the following topics:
- Self-managed Oracle database: CREATE USER and GRANT
- PolarDB cluster: Create an account
Enable logging and grant fine-grained permissions to an Oracle database account