Help Center/ GaussDB/ Best Practices/ Migrating the Database
Updated on 2024-09-05 GMT+08:00

Migrating the Database

This section describes how to create a DRS instance and migrate test_info in the Oracle database to test_database_info in the GaussDB instance.

Pre-migration Check

Before creating a migration task, you need to manually check the migration conditions for smooth migration.

Before the migration, you need to obtain notes on migration to the cloud.

Creating a Migration Task

  1. Log in to the Huawei Cloud console.
  2. Click in the upper left corner and select a region.

    Select the region in which the destination instance is located.

  3. Click in the upper left corner of the page and choose Databases > Data Replication Service.
  4. In the navigation pane on the left, choose Data Synchronization Management. On the displayed page, click Create Synchronization Task.
  5. Configure synchronization instance information.

    1. Select a region, billing mode, and project, and enter a task name.

    2. Configure synchronization instance details. Specifically, specify Data Flow, Source DB Engine, Destination DB Engine, Network Type, DRS Task Type, Destination DB Instance, Synchronization Instance Subnet, Synchronization Mode, Specify EIP (mandatory when Network Type is set to Public Network), Specifications, AZ, Enterprise Project, and Tags (optional).

    3. Click Create Now.

  6. Configure the source and destination database information.

    1. Configure DNS Server as required. Specify connection information about the source database, including the IP address, port, username, and password.

      Click Test Connection.

    2. Enter the username and password of the destination database.

      Click Test Connection.

    3. Click Next. In the displayed box, read the message carefully and click Agree.

  7. Set the synchronization task.

    1. Select the databases and tables of the source database to be migrated. For example, select the DATATYPELIST table from the test_info database.

    2. Locate the database and table, respectively, and click Edit to change the database name and table name.

    3. On the displayed box, enter the new name, for example, enter DATATYPELIST_After as the new table name.

      The name cannot include special characters. Otherwise, an error will be reported during SQL statement execution after the migration.

    4. Confirm the settings and click Next.

  8. Confirm advanced settings.

    The information on the Advanced Settings page is for confirmation only and cannot be modified. After confirming the information, click Next.

  9. Process data.

    On this page, you can process the table to be migrated. Select the column to be migrated and change its name, for example, change COL_01_CHAR______E to new-line.
    1. Select the table to be processed.

    2. Select the COL_01_CHAR______E column.

    3. Enter the new name new-line and click OK.

    4. Click Next.

  10. Perform a pre-check.

    1. After all settings are complete, perform a pre-check to ensure that the migration is successful.

    2. If any check fails, review the cause and rectify the fault. Then, click Check Again.

    3. If all check items are successful, click Next.

  11. Confirm the task.

    1. Check whether all configured information is correct.

    2. Specify Start Time and select the check box before the agreement.
    3. Click Submit.

  12. After the task is submitted, view and manage it.

    After the task is created, return to the task list to view the status of the created task.