Help Center/ Cloud Data Migration/ User Guide/ Managing Links/ Link to a Common Relational Database
Updated on 2022-09-22 GMT+08:00

Link to a Common Relational Database

Common relational databases include GaussDB(DWS), RDS for PostgreSQL, RDS for SQLServer, PostgreSQL, Microsoft SQL Server, and SAP HANA.

Prerequisites

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

Parameters for a link to a common relational database

Table 1 lists the link parameters.
Table 1 Parameters for a link to a common relational database

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 connect

Click Select next to the text box and select a DWS or RDS DB instance in the displayed dialog box.

192.168.0.1

Port

Port of the database to connect

The port number varies depending on the database. Examples:

Default port of SQL Server: 1433

Default port of PostgreSQL: 5432

Database Name

Name of the database to connect

dbname

Username

Username used for accessing the database This account must have the permissions required to read and write data tables and metadata.

cdm

Password

Password of the user

-

Use Agent

Whether to extract data from the data source through an agent

Yes

Agent

Click Select and select the agent created in Managing Agents.

-

Driver Version

Select a driver version that adapts to the database type.

-

Fetch Size

(Optional) Displayed when 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

SSL Encryption

(Optional) If you set this parameter to Yes, CDM can connect to the database (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.

The following are some examples:
  • connectTimeout=360000 and socketTimeout=360000: When a large amount of data needs to be migrated or the entire table is retrieved using query statements, the migration fails due to connection timeout. In this case, you can customize the connection timeout interval (ms) and socket timeout interval (ms) to prevent failures caused by timeout.
  • useCursorFetch=false: By default, useCursorFetch is enabled, indicating that the JDBC connector communicates with relational databases using a binary protocol. Some third-party systems may have compatibility issues, causing migration time conversion errors. In this case, you can disable this function. Open-source MySQL databases support the useCursorFetch parameter, and you do not need to set this parameter.

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.

'