All Products
Document Center

Migrate data from Oracle to DRDS without stopping services

Last Updated: Jul 30, 2019

DTS allows you to migrate data from your local Oracle instance to a DRDS instance. DTS supports full migration and incremental migration. Incremental data migration allows you to migrate data without disruption to service of the source Oracle instance.

This topic describes how to configure data migration tasks that migrate data from Oracle instances to DRDS instances.

Migration procedure

For migration from Oracle instances to DRDS instances, the mechanism for existing data migration and data changes replication is as follows:

  • Existing data migration
    DTS migrates all the data of the migration objects in the source database to the target instance. If you select full data migration as the migration type, the incremental data written to the local Oracle database during the migration may not be migrated to the target DRDS instance. Modifications and deletions may not be synchronized to the target DRDS instance. Therefore, to ensure the consistency of the data during a full migration, you need to pause writes to the Oracle instance and make the instance read only.

  • Data changes replication

    During the incremental migration, DTS listens on the source Oracle instance and gets the redo log generated by it. Then DTS synchronizes the incremental change data to the target DRDS instance in real time. Incremental data migration enables synchronization of real-time data between the target DRDS instance and the source Oracle instance.

Migration permission requirements

Using DTS to migrate data from Oracle instance to DRDS instances in different migration types requires different migration account permissions of the source and target databases:

Migration type Migrate object structure Migrate existing data Replicate data changes
Local Oracle instance Owner of schema Owner of schema SYSDBA
Target DRDS instance Read and write permissions on the target database Read and write permissions on the target database Read and write permissions on the target database

Prerequisites of migration

  • The Oracle version is 10g, 11g, or 12c.
  • The supplement log of the Oracle instance is open, as well as supplemental_log_data_pk and supplemental_log_data_ui.
  • The Oracle instance needs to be enabled in Archive Log Mode.

The following procedure describes how to configure a task for migrating data from an Oracle database instance to a DRDS instance using DTS.

Create DRDS instance migration objects

During the data migration process, if the database or the data table to be migrated does not exist in the target DRDS instance, you need to create the database and corresponding tables manually in the target DRDS instance before you configure the migration task.

Migration procedure

After all the preceding prerequisites are met, you can start to configure a migration task. The following describes the procedure of configuring a migration task.

  1. Log on to the DTS console, and click Create migration task in the upper-right corner to start configuring the task.

  2. Configure the connection information of the local Oracle instance and the target DRDS instance.

    This step configures the migration task name, Oracle connection information, and the target DRDS instance connection information. Specifically:

    • Task name

    DTS generates a name for each task automatically. The task name is not required to be unique. You can modify the task name as required. We recommend that you configure a meaningful name so that the task can be easily identified.

    • Source instance information

      • Instance type: Select On-premises databases .
      • Database type: Select Oracle.
      • Host name or IP address: Configure the address for accessing the Oracle database. The address must be accessed by public networks.
      • Port: Listening port of the Oracle database instance.
      • SID: SID of the Oracle database instance.
      • Database account: The account for access to the Oracle database.
      • Password: The password of the preceding database account.
    • Target instance information

      • Instance type: select DRDS instances.
      • DRDS instance ID: ID of the target DRDS instance to which you want to migrate data.
      • DRDS Database: Database of the target DRDS instance.
      • Account: Connection account for the DRDS instance.
      • Password: Password of the preceding account.

    After you configure the connection information, click Authorize Whitelist and enter into next step in the lower-right corner to add entries to the whitelist.

  3. Configure the migration object and migration type.

    Available migration types include full migration and incremental migration. By default, full data migration is selected. If you want to migrate from Oracle instances to DRDS instances without downtime, you need to select full data migration and incremental data migration.

    Select the object to be migrated. Migration objects can be databases, tables, and columns.
    By default, when the object is migrated to the DRDS instance, the object name remains the same as the object name in the source Oracle instance. If the object you have migrated has a different name in the target instance, you need to use the object name mapping feature provided by DTS. For more information, see Map databases, tables, and columns.

    After you configure the migration objects and migration types, you need to choose the migration mode for tables without a primary key.

  4. Choose migration mode for tables without a primary key

    To support incremental migration for tables without a primary key in Oracle databases, and to ensure that data remains consistent after migration, you need to choose whether to manually add a new alibaba_dts_row_id column to tables without a primary key in the DRDS databases. For tables without a primary key that require incremental migration, add this column manually when you create the corresponding tables in the target DRDS instances of the migration. This column is maintained by DTS during migration. The column cannot be deleted during migration. Or, the migration fails.
    If you add a new column named alibaba_dts_row_id, the migration of a table without a primary key do not generate duplicate data so that the migrated data remains the same with the data in the source instance. Otherwise, duplicate data may exist in the target instance.

  5. Perform a task pre-check.

    A pre-check is performed before a migration task is started. Migration can be started only if the pre-check is successful.

    If the pre-check fails, check the failure details by clicking Details next to the specific check items, fix the errors accordingly, and then perform a pre-check again.


  6. Start the migration task

    If the pre-check is passed, you can start the migration task. After the task is started, you can view the specific migration status and progress in the task list.

    When a task enters the incremental data migration phase, the task does not automatically stop. Once the source Oracle instance has an incremental write, the incremental data is automatically synchronized to the target DRDS instance. Incremental migration is a process of dynamic synchronization. We recommend that you verify the business with the target database when there is no delay in incremental migration. If the verification is successful, you can stop the migration task and switch the business to the target database.

You have completed the configuration of the data migration task that migrates data of local Oracle instances to DRDS instances.