Migrating On-Premises Oracle Database to RDS MySQL

DRS can migrate on-premises Oracle databases to RDS MySQL instances.

This section describes how to configure Oracle to RDS MySQL migration through a public network.

Prerequisites

  • You have logged in to the DRS console.
  • Your account balance is greater than or equal to ¥0.
  • The migration requirements are met. For details, see Real-Time Migration.
  • The constraints on DRS usage are met. For details, see Before You Start.
  • The data types are matched. For details, see Mapping Data Types.

Migration Process

  1. On the Online Migration Management page, click Create Migration Task.
  2. On the Select Scenario page, select Source Database Type and Destination Database Type and click Next.

    • In this example, the source database is On-premises databases, Databases on the current cloud, Self-built databases on ECS, or Databases on other cloud. The destination database is Databases on the current cloud.
    • You cannot use DRS to migrate from an on-premises database to another on-premises database.

  3. On the Create Replication Instance page, configure task details, recipients, description, and the replication instance, and click Next.

    Figure 1 Migration task information
    Table 1 Task and recipient description

    Parameter

    Description

    Task Name

    The task name consists of 4 to 50 characters, starts with a letter, and can contain only letters (case-insensitive), digits, hyphens (-), and underscores (_).

    Send Notifications

    This parameter is optional. If this function is enabled, DRS will send notifications to specified recipients based on the mobile numbers and email addresses you provided. If an exception occurs during migration, the system will send a notification to the specified recipients.

    NOTE:

    Recipients must confirm the subscription on the SMN console within 48 hours of receiving an SMS message or email. Otherwise, they cannot receive notifications from DRS.

    Synchronization Delay Threshold

    During an incremental migration, a synchronization delay indicates a time difference (in seconds) of synchronization between the source and destination database.

    If the synchronization delay exceeds the threshold you specify, DRS will send alarms to the specified recipients. The value ranges from 1 to 3,600. To avoid repeated alarms caused by the fluctuation of delay, an alarm is sent only after the delay has exceeded the threshold for six minutes.

    NOTE:
    • In the early stages of an incremental migration, there is more delay because more data is waiting to be synchronized. In this situation, no notifications will be sent.
    • Before setting the delay threshold, you need to enter the recipient's mobile number or email address.
    • Currently, the synchronization delay threshold cannot be set for Oracle to PostgreSQL migration.

    Description

    The description consists of a maximum of 256 characters and cannot contain the following special characters: !=<>'&"

    Figure 2 Replication instance information
    Table 2 Replication instance settings

    Parameter

    Description

    Data Flow

    Select To the cloud.

    The destination database must be an RDS database on the current cloud.

    Source DB Engine

    Select Oracle.

    Destination DB Engine

    Select MySQL.

    The following DB engines are supported: MySQL and PostgreSQL.

    Network Type

    The following network types are supported: VPN, Direct Connect, and public network.

    You can select a network type based on the site requirements. The following uses the public network as an example.

    Destination DB Instance

    Select the DB instance you created.

    Replication Instance Subnet

    The subnet where the replication instance resides. You can also click View Subnet to go to the network console to view the subnet where the instance resides.

    By default, the DRS instance and the destination DB instance are in the same subnet. You need to select the subnet where the DRS instance resides, and there are available IP addresses for the subnet. To ensure that the replication instance is successfully created, only subnets with DHCP enabled are displayed.

    Migration Type

    • Full
      This migration type is suitable for scenarios where service interruption is permitted. It migrates all objects and data to the destination database at one time.
      NOTE:

      If you perform a full migration, you are advised to stop operations on the source database. Otherwise, data generated in the source database during the migration will not be synchronized to the destination database.

    • Full+Incremental

      This migration type allows you to migrate data without interrupting services. After a full migration initializes the destination database, an incremental migration initiates and parses logs to ensure data consistency between the source and destination databases.

      NOTE:
      • The Oracle to PostgreSQL migration does not support the full plus incremental migration mode.
      • If you select the Full+Incremental migration type, data generated during the full migration will be synchronized to the destination database with zero downtime, ensuring that both the source and destination databases remain accessible.

  4. On the Configure Source and Destination Databases page, wait until the replication instance is created, and then configure the source and destination database details. You need to click Test Connection in the Source Database and Destination Database areas to check that both the source and destination databases are connected. Then, select the check box before the agreement and click Next.

    Figure 3 Source database configuration
    Table 3 Source database information

    Parameter

    Description

    IP Address or Domain Name

    The IP address or domain name of the source database.

    Port

    The port of the source database.

    Range: 1 - 65535

    Database Service Name

    You can use the database service name (service name or SID) to connect to Oracle databases.

    Select Service Name or SID from the drop-down list and enter the corresponding value.

    Use a user with the DBA permissions to query its value:

    • Use either of the following statements to query the service name:
      • Statement 1:
        select value from v$parameter where name like '%service_name%';
      • Statement 2:
        show parameter service_name;
    • View SID:
      select instance_name from V$instance;

    Database Username

    The username for accessing the source database.

    Database Password

    The password for the database username.

    SSL Connection

    SSL encrypts the connections between the source and destination databases. If SSL is enabled, upload the SSL CA root certificate.

    NOTE:
    • The maximum size of a single certificate file that can be uploaded is 500 KB.
    • If the SSL certificate is not used, your data may be at risk.
    Figure 4 Destination database configuration
    Table 4 Destination database information

    Parameter

    Description

    DB Instance Name

    The RDS DB instance you selected when creating the migration task and cannot be changed.

    Database Username

    The username for accessing the destination database.

    Database Password

    The password for the database username.

    The database username and password are encrypted and stored in the system and will be cleared after the task is deleted.

  5. On the Set Task page, select migration objects and click Next.

    Figure 5 Set Task
    Table 5 Migration object

    Parameter

    Description

    Migration Object

    Only customized objects at the view- and table-level can be migrated. After migration objects are successfully migrated, they are saved in the destination database with their name changed to lowercase. If the source database is changed, click in the upper right corner before selecting migration objects to ensure that the objects to be selected are from the changed source database.

    NOTE:
    • If you choose not to migrate all of the database objects, the migration may fail because the objects, such as tables and views, in the database to be migrated may have dependencies on other objects that are not migrated. You are advised to ensure that all the referenced objects are migrated.
    • Only one database can be selected as a migration object for the Oracle to PostgreSQL migration.
    • When you select an object, the spaces before and after the object name are not displayed. If there are two or more consecutive spaces in the middle of the object name, only one space is displayed.

  6. On the Check Task page, check the migration task.

    • If any check fails, review the cause and rectify the fault. After the fault is rectified, click Check Again.

      For details about how to handle check failures, see the Checking Whether the Source Database Is Connected section in the Data Replication Service User Guide.

      Figure 6 Task check
    • If the check is complete and the check success rate is 100%, click Next.

      You can proceed to the next step only when all check items are successful. If any alarms are generated, view and confirm the alarm details first before proceeding to the next step.

  7. On the Confirm Task page, specify Start Time, confirm that the configured information is correct and click Submit to submit the task.

    Set Start Time to Start upon task creation or Start at a specified time based on site requirements.

    After a migration task is started, the performance of the source and destination databases may be affected. You are advised to start a migration task during off-peak hours.

  8. After the task is submitted, view and manage it on the Online Migration Management page.

    • You can view the task status. For more information about task status, see Task Status.
    • You can click in the upper-right corner to view the latest task status.

  9. After the migration task is created, complete data service cutover by referring to Process in the Getting Started with Data Replication Service.