This topic describes how to use Advanced Database & Application Migration (ADAM) to migrate the schema of a self-managed Oracle database to a PolarDB for Oracle cluster. Then, you can use Data Transmission Service (DTS) to migrate data.

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.
  • If the version of your Oracle database is 12c or later, the names of the tables to migrate 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.
  • If the PolarDB for Oracle cluster is not located in the China (Beijing), China (Hangzhou), China (Zhangjiakou), China (Shenzhen), or China (Shanghai) region, you must apply a public endpoint for the PolarDB for Oracle cluster. For more information, see Apply for an endpoint.
  • The polar_comp_redwood_raw_names parameter is set to off for the PolarDB for Oracle cluster. For more information, see Configure cluster parameters.

Step 1: Collect the database schema

The following table describes the methods that you can use to collect the database schema by using ADAM.

Collection method Scenario References
Collect database information online
  • The source Oracle database has a public IP address. You can access the database over the Internet.
  • The source Oracle database has no public IP addresses. You can access the database by using Alibaba Cloud Database Gateway.
Collect database information
Download Database Collector to collect database information The source database cannot be accessed over the Internet. You must download a Database Collector client to collect the information of the database. Collect database information

Step 2: Analyze the database profile

  1. Log on to the ADAM console. In the left-side navigation pane, click Evaluate DB.
  2. On the Collect DB Information tab, click Next: View Source Database Profile.
  3. Click Create Profile. In the Create Profile panel, set the basic information of the profile and click Create.
    Parameter Description
    Profile Name Specify an informative profile name for easy identification.
    Type The value of this parameter is set to Oracle.
    Report Language Type Select Chinese or English.
    Data File
    1. Click Upload.
    2. Select the compressed file that is exported in Step 1: Collect the database schema.
  4. Return to the profile list, find the database profile, and then click Details in the Actions column. The source database profile is analyzed based on the following aspects: scale, session, risk, hotspot, complexity, and load.
    Analyze the database profile

Step 3: Evaluate the compatibility of the destination database

  1. In the left-side navigation pane, click Evaluate DB.
  2. Click the Evaluate Dest. DB tab.
  3. Click Create Project. In the Create Project panel, set the basic information of the project and click Create.
    Parameter Description
    Project Name Specify an informative project name for easy identification.
    Project Type Select POLARDB-O.
    Destination Database Version Select POLARDB O.
    Report Language Select Chinese or English.
    Source Database Profile Select the source database profile that is created in Step 2.
    Migrate LOBs to OSS Select yes or no to specify whether to migrate large objects (LOBs) to Object Storage Service (OSS).
    Select Evaluated Schemas Select the schemas that you want to evaluate.
    1. In the Not Selected section, select the schemas that you want to evaluate.
    2. Click the Right arrow icon to add the schemas to the Selected section.
    After the project is created, the state of the project changes to Processing.
  4. Wait until the project evaluation is completed, and then click Details in the Actions column of the project. You can view the compatibility, specifications, and migration risks of the destination database. ADAM provides corresponding solutions.

Step 4: Migrate and revise the database schema

Transformation type Preparation References
Online transformation
  • For your account permissions:
    • If you are using an Alibaba Cloud account, skip this step.
    • If you are using a Resource Access Management (RAM) user, perform the following steps:
      • Log on to the ADAM console by using your Alibaba Cloud account.
      • On the Transform & Migrate DB page, grant the relevant permissions to the RAM user.
  • Add the CIDR blocks of ADAM servers to the whitelist of the PolarDB for Oracle cluster. For more information, see Configure a whitelist of the destination database and Add CIDR blocks to the whitelist of a cluster.
    • If the ADAM server that is used to migrate a database and the destination database are in the same region, you must add the private CIDR block of the ADAM server in the region to the whitelist of the destination database.
    • If the ADAM server that is used to migrate a database and the destination database are in different regions, you must add the public CIDR block of the ADAM server to the whitelist of the destination database.
Online transformation.
Warning Online transformation implements only the migration of schemas. When you migrate the schema of a database, ADAM evaluates and verifies the objects and provides solutions for incompatible objects. You can troubleshoot issues based on the error messages to ensure better compatibility between the source and destination databases.

What to do next

Migrate data from a self-managed Oracle database to a PolarDB for Oracle cluster