Rate This Document
Findability
Accuracy
Completeness
Readability

Database Connection Configuration

During SQL migration, you can select a source and a destination database. The tool can connect to the databases through JDBC, automatically export the data definition language (DDL) of the source database, and assess the compatibility of SQL statements to improve the migration accuracy.

Prerequisites

You have logged in to the Kunpeng DevKit.

  • Both the devadmin administrator and common users can configure database connection information, but each can manage only the connection configurations they create.
  • A maximum of 50 database connection configurations can be added.

Procedure

  1. Click in the upper right corner of the page. On the displayed page, choose Tool Settings > Migration > Database Connection Configuration.
  2. Click Add Configuration, set parameters based on Table 1, and click OK.
    Figure 1 Add Configuration
    Table 1 Database connection parameters

    Parameter

    Description

    Configuration Name

    Enter a custom database connection configuration name.

    • It can contain only letters, digits, periods (.), hyphens (-), and underscores (_).
    • It contains 1 to 64 characters.

    User Name

    Enter the database user name.

    • It can contain only letters, digits, periods (.), hyphens (-), and underscores (_).
    • It contains 1 to 64 characters.

    Password

    Enter the database user's password, which contains 1 to 128 characters.

    JDBC URL

    Enter the JDBC URL to connect to the database. The URL must start with jdbc:, contain 5 to 256 characters, and cannot contain spaces.

    Set this parameter based on the database type. The following is a common URL format.

    • For MySQL: jdbc:mysql://{ip}:{port}/{database_name}
    • For Oracle: jdbc:oracle:thin:@//{ip}:{port}/{service_name}
    • For DB2: jdbc:db2://{ip}:{port}/{database_name}
    • For DM: jdbc:dm://{ip}:{port}/{database_name}
    • For Vastbase: jdbc:vastbase://{ip}:{port}/{database_name}
    • For KINGBASE: jdbc:kingbase8://{ip}:{port}/{database_name}
    • For GoldenDB: jdbc:goldendb://{ip}:{port}/{database_name}
    • For TDSQL: jdbc:mysql://{ip}:{port}/{database_name}
    NOTE:

    {ip} indicates the database IP address. {port} indicates the database port. {database_name} indicates the database name. {service_name} indicates the database service name.

    Driver JAR Path

    Enter the path to the driver JAR package. It contains a maximum of 256 characters.

    Upload the driver JAR file to the /opt/DevKit/devkitplugins/porting/driver_jar directory and ensure that you have the read permission on the file. If the directory does not exist, manually create it and grant the read and write permissions to the DevKit installation user.

    NOTE:

    /opt: tool installation directory. Replace it with the actual directory.

    Driver Class Name

    Enter the JDBC driver class name for connecting to the database, for example, com.mysql.cj.jdbc.Driver.

    • It can contain only letters, periods (.), hyphens (-), and underscores (_).
    • It contains 1 to 64 characters.
  3. Click Edit or Delete in the operation area on the right to edit or delete the database connection configuration, or click Batch Delete to delete multiple database connection configurations at a time.
    • Edit: Modify the database connection configuration.
    • Delete/Batch Delete: After deletion, a database connection configuration cannot be restored. Exercise caution when performing this operation.