Help Center> Cloud Data Migration> User Guide> Link Management> Link to Relational Databases

Link to Relational Databases

CDM supports the following relational databases:

  • Data Warehouse Service
  • RDS for MySQL
  • RDS for PostgreSQL
  • RDS for SQL Server
  • MySQL
  • PostgreSQL
  • Microsoft SQL Server
  • Oracle
  • IBM Db2
  • FusionInsight LibrA
  • Derecho (GaussDB)
  • NewSQL (GaussDB)
  • SAP HANA
  • MYCAT
  • Dameng database
  • Sharding

Prerequisites

You have uploaded the required driver by following the instructions provided in Managing Drivers.

Link Parameters

Table 1 describes the required parameters of the link to DWS, RDS for MySQL, RDS for PostgreSQL, RDS for SQL Server, MySQL, PostgreSQL, Microsoft SQL Server, Oracle, IBM Db2, or Derecho (GaussDB).
Table 1 Parameter description

Parameter

Description

Example Value

Name

Link name, which should be defined based on the data source type, so it is easier to remember what the link is for

mysql_link

Database Server

IP address or domain name of the database to be connected

Click Select next to the text box to obtain the list of DWS and RDS instances.

192.168.0.1

Port

Port number of the database to be connected

3306

Connection Type

This parameter is available only for Oracle database links. The options are as follows:
  • Service Name: Use SERVICE_NAME to connect to the Oracle database.
  • SID: Use SID to connect to the Oracle database.

SID

Instance Name

Oracle instance ID, which is used to differentiate databases by instances. This parameter is available only when an Oracle link is created and Database Link Type is set to SID.

dbname

Database Name

Name of the database to be connected

dbname

Username

Username used for accessing the database. This account must be able to read and write data tables and read metadata of the database.

cdm

Password

Password of the account

-

Use Agent

Whether to extract data from the data source through an agent

Yes

Agent

Click Select and select the agent created in Connecting to an Agent.

-

Import Mode

COPY: Migrate the source data to the DWS management node and then copy the data to DataNodes. To access DWS through the Internet, select COPY.

COPY

Fetch Size

(Optional) This parameter is displayed only after you click Show Advanced Attributes.

Number of rows obtained by each request. Set this parameter based on the data source and the job's data size. If the value is either too large or too small, the job may run for a long time.

1000

Use Local API

(Optional) Whether to use the local API of the database for acceleration.

When you create a MySQL link, CDM automatically enables the local_infile system variable of the MySQL database to enable the LOAD DATA function, which accelerates data import to the MySQL database.

If CDM fails to enable this function, contact the database administrator to enable the local_infile system variable. Alternatively, set Use Local API to No to disable API acceleration.

If data is imported to RDS for MySQL, the LOAD DATA function is disabled by default. In such a case, you need to modify the parameter group of the MySQL instance and set local_infile to ON to enable the LOAD DATA function.

NOTE:

If local_infile on RDS is uneditable, it is the default parameter group. You need to create a parameter group, modify its values, and apply it to the RDS for MySQL instance. For details, see the Relational Database Service User Guide.

Yes

SSL Encryption

(Optional) If you set this parameter to Yes, CDM can connect to RDS (on-premises databases excluded) in SSL encryption mode.

Security hardening has been performed on RDS for PostgreSQL. For this reason, when creating a link to RDS for PostgreSQL, set this parameter to Yes.

Yes

Link Attributes

(Optional) Click Add to add the JDBC connector attributes of multiple specified data sources. For details, see the JDBC connector document of the corresponding database.

sslmode=require

Reference Sign

(Optional) Delimiter between the names of the referenced tables or columns. For details, see the product documentation of the corresponding database.

'

Oracle Version

This parameter is displayed only when you create an Oracle link. Select an option according to the version of the Oracle database. If the error message, "java.sql.SQLException: Protocol violation", is displayed, select another option.

Later than 12.1