This topic describes how to migrate data between self-managed Oracle databases by using Data Transmission Service (DTS). DTS supports schema migration, full data migration, and incremental data migration. You can select all of the supported migration types to ensure service continuity.
Prerequisites
- The versions of the source and destination Oracle databases are 9i, 10g, 11g, 12c,
18c, or 19c.
Note To ensure compatibility, make sure that the versions of the source and destination databases are the same.
- Supplemental logging, including SUPPLEMENTAL_LOG_DATA_PK and SUPPLEMENTAL_LOG_DATA_UI, is enabled for the source Oracle database. For more information, see Supplemental Logging.
- The source 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.
- The available storage space of the destination Oracle database is larger than the total size of the data in the source Oracle database.
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%.
- The tables to be migrated in the source database must have PRIMARY KEY or UNIQUE constraints and all fields must be unique. Otherwise, the destination database may contain duplicate data records.
- 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.
Important 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.
- 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.
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 to the destination Oracle database.
DTS supports schema migration for the following types of objects: table, view, synonym,
trigger, stored procedure, function, package, and user-defined type.
Note If an object contains triggers, the data between the source and destination databases
will become inconsistent.
|
Full data migration | DTS migrates historical data of the required objects from the source Oracle database
to the destination Oracle 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, DTS retrieves redo log files from the source Oracle database. Then, DTS synchronizes incremental data from the source Oracle database to the destination Oracle database. Incremental data migration allows you to ensure service continuity when you migrate data between Oracle databases. |
Permissions required for database accounts
Database | Schema migration | Full data migration | Incremental data migration |
---|---|---|---|
Source Oracle database | The permissions of the schema owner | The permissions of the schema owner | The database administrator (DBA) permission |
Destination Oracle database | 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 an Oracle database account, see CREATE USER and GRANT.
Enable logging and grant fine-grained permissions to an Oracle database account
Procedure
The procedure in this topic uses a self-managed database hosted on ECS as an example. You can also follow the procedure to configure data migration tasks for other types of self-managed Oracle databases.