This topic describes how to configure an ApsaraDB RDS for SQL Server connection in DataWorks.

Procedure

  1. Log on to the DataWorks console. In the left-side navigation pane, click Workspaces. On the page that appears, click Data Integration in the Actions column corresponding to the target workspace.
  2. On the Data Integration page that appears, click Connection in the left-side navigation pane. On the page that appears, click Add a Connection.
  3. In the Add Connection dialog box that appears, click SQLServer.
    SQL Sever connection
  4. In the Add SQLServer Connection dialog box that appears, configure the parameters as prompted.

    The SQL Server connection type can be set to ApsaraDB for RDS or Connection Mode. You can select a type as required.

    • ApsaraDB for RDSSelect ApsaraDB for RDS
      Parameter Description
      Connect To The type of the connection. Set the value to ApsaraDB for RDS.
      Connection Name The name of the connection. The name can contain letters, digits, and underscores (_). It cannot start with a digit or underscore (_).
      Description The description of the connection. The description can be up to 80 characters in length.
      Environment The environment in which the connection is used. Valid values: Development and Production.
      Region Select a Region.
      RDS Instance ID The ID of the ApsaraDB RDS for SQL Server instance. You can view the ID in the ApsaraDB for RDS console.
      RDS Instance Account ID The ID of the Alibaba Cloud account used to purchase the ApsaraDB RDS for SQL Server instance.
      Database Name The name of the database in the ApsaraDB RDS for SQL Server instance.
      Username and Password The username and password used to connect to the ApsaraDB RDS for SQL Server database.
    • Connection Mode
      Parameter Description
      Connect To The type of the connection. Set the value to Connection Mode.
      Connection Name The name of the connection. The name can contain letters, digits, and underscores (_). It cannot start with a digit or underscore (_).
      Description The description of the connection. The description can be up to 80 characters in length.
      Environment The environment in which the connection is used. Valid values: Development and Production.
      JDBC URL The JDBC URL of the database, which is in the jdbc:sqlserver://ServerIP:Port;DatabaseName=Database format.
      Username and Password The username and password used to connect to the ApsaraDB RDS for SQL Server database.
  5. Click Test Connection. After the connection passes the test, click Complete.

    Description of connectivity test

    • If the user-created data source is hosted on an ECS instance in the classic network, network connectivity is not guaranteed when nodes are deployed in the default resource group. We recommend that you use custom resource groups.
    • In a VPC, if you use an instance to configure the connection, the connectivity test checks whether the entered information is correct.
    • In a VPC, if you use an internal address as the JDBC URL to configure the connection, the connectivity test will fail.
    • If you use a public address as the JDBC URL to configure the connection, the connectivity test checks whether the entered information is correct.