This topic describes how to connect Kingdee K/3 WISE 15.0 or 15.1 to ApsaraDB RDS for SQL Server to implement distributed transactions between an RDS instance and an Elastic Compute Service (ECS) instance.

Solution

This solution consists of three steps:
  1. Restore account set data to the RDS instance: Upload the full backup data of the Kingdee K/3 WISE account set database to Object Storage Service (OSS), and then restore the backup data to the RDS instance.
  2. Allow distributed transactions: Adjust the access settings of the RDS instance, ECS instance, and Windows operating system to ensure smooth communication for distributed transactions.
  3. Replace the old account set management tool with a new one: Replace the old account set management tool with a new one that is compatible with ApsaraDB for RDS.

Preparations

Note
  • The ECS instance on which Kingdee K/3 WISE is installed must reside in the same region and Virtual Private Cloud (VPC) as the RDS instance. For more information, see Overview of VPCs and VSwitches.
  • The RDS instance must run one of the following SQL Server versions and RDS editions:
    • SQL Server 2017 on RDS Basic Edition
    • SQL Server 2012 or 2016 EE on RDS High-availability Edition
    • SQL Server 2012 or 2016 on RDS Standard Edition

Restore account set data to the RDS instance

Follow these steps to upload a backup file of account set data to an OSS bucket:

  1. Log on to the OSS console.
  2. Click Create Bucket on the right.
  3. Configure the following parameters.
    Parameter Description
    Bucket Name Enter a name for the bucket.
    Region Select the region where you want to create the bucket. Make sure that the bucket resides in the same region as the ECS and RDS instances.
    Storage Class Select IA.
    Access Control List (ACL) Select Private.
    Server-side Encryption Select None.
    Zone-redundant Storage Select Disable.
    Real-time Log Query Select Disable.
    Note For more information about the parameters, see Create a bucket.
  4. Click OK.
  5. In the left-side navigation pane, click Buckets. On the page that appears, click the bucket that you created.
  6. In the navigation tree that appears, click Files. On the page that appears, click Upload.
  7. Drag the backup file to be uploaded to the Upload section. Alternatively, click Upload and select the backup file.
    Note For more information about the parameters, see Upload an object.

Follow these steps to create a privileged account for the RDS instance:

  1. Log on to the ApsaraDB for RDS console.
  2. In the top navigation bar, select the region where the target RDS instance resides.
  3. Find the target RDS instance and click its ID.
  4. In the left-side navigation pane, click Accounts.
  5. Click Create Account.
  6. Configure the following parameters.
    Parameter Description
    Database Account Enter the username of the account. The username must be 2 to 16 characters in length and can contain lowercase letters, digits, and underscores (_). It must start with a lowercase letter and end with a lowercase letter or digit.
    Account Type Specify the type of the account. Select Privileged Account.
    Password Enter the password of the account. The password must meet the following requirements:
    • The password must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • Allowed special characters include: ! @#$%^&*()_+-=
    Re-enter Password Enter the password of the account again.
    Description Enter a description that helps identify the account.
  7. Click Create.

Follow these steps to migrate backup data from the OSS bucket to the RDS instance:

  1. Log on to the ApsaraDB for RDS console.
  2. In the top navigation bar, select the region where the target RDS instance resides.
  3. Find the target RDS instance and click its ID.
  4. In the left-side navigation pane, click Backup and Restoration.
  5. In the upper-right corner of the page, click Migrate OSS Backup Data to RDS.
    Note If this button does not exist, check whether the SQL Server version and edition of the RDS instance meet requirements.
  6. Click Next twice to go to the Import Data step.
  7. Configure the following parameters.
    Parameter Description
    Database Name Enter the name of the destination database on the RDS instance.
    OSS Bucket Select the OSS bucket where the backup file is stored.
    OSS Subfolder Name Enter the name of the subfolder where the backup file is stored.
    OSS File Enter the prefix of the backup file name and click the search button. A list of files is displayed. The list contains the name, size, and update time of each file that matches the query. Select the backup file that you want to restore.
    Cloud Migration Method Select Immediate Access (Full Backup).
    Consistency Check Mode Select Synchronous DBCC.
    Note If you are migrating backup data from OSS to ApsaraDB for RDS for the first time, the system prompts you to authorize the OSS access permission to your Alibaba Cloud account. Click Authorize and Confirm Authorization Policy.
  8. Click OK.
    Note Wait for the data to be imported. You can click Databases in the left-side navigation pane to view the database status.

Allow distributed transactions

Follow these steps to configure the RDS instance:

  1. Log on to the ApsaraDB for RDS console.
  2. In the top navigation bar, select the region where the RDS instance resides.
  3. Find the target RDS instance and click its ID.
  4. In the left-side navigation pane, click Data Security.
  5. Find the target whitelist and click Edit to the right. In the dialog box that appears, enter the IP address of the ECS instance.
    Note
    • If the ECS and RDS instances reside in the same VPC, enter the private IP address of the ECS instance. You can view the private IP address on the Instance Details page for the ECS instance in the ECS console.
    • If the ECS and RDS instances do not reside in the same VPC, enter the public IP address of the ECS instance and apply for a public endpoint for the RDS instance. For more information, see Apply for a public endpoint for an RDS SQL Server instance.
  6. Click OK.
  7. Click the Whitelist for Distributed Transaction tab.
  8. Click Create Whitelist.
  9. Configure the following parameters.
    Parameter Description
    Group Name Enter the name of the whitelist. The name must be 2 to 32 characters in length and can contain digits, lowercase letters, and underscores (_). It must start with a lowercase letter and end with a lowercase letter or digit.
    Whitelist Enter the IP address of the ECS instance and the name of the Windows-based computer where the ECS instance resides. Make sure that you separate the IP address and the computer name with a comma (,). Example: 192.168.1.100,k3ecstest.

    Enter multiple entries in different lines.

    Note You can view the computer name by choosing Control Panel > System and Security > System.
  10. Click OK.

Follow these steps to configure the ECS instance:

  1. Log on to the ECS console.
  2. In the left-side navigation pane, click Instances. In the top navigation bar, select the region where the ECS instance resides.
  3. Find the ECS instance and click its ID.
  4. In the left-side navigation pane, click Security Groups.
  5. Find the target security group and in the Actions column and click Add Rules.
  6. In the upper-right corner of the page, click Add Security Group Rule.
  7. Configure the following parameters.
    Parameter Description
    Rule Direction Select Inbound.
    Action Select Allow.
    Protocol Type Select Custom TCP.
    Port Range Enter 135.
    Note Port 135 is the fixed port of the RPC service.
    Priority Enter 1.
    Authorization Type Select IPv4 CIDR Block.
    Authorization Object View the two IP addresses displayed on the Whitelist for Distributed Transaction tab of the Data Security page in the ApsaraDB for RDS console. Enter them in the Authorization Objects field.
    Description Enter a description that helps identify the rule. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
  8. Click OK.
  9. Add another security group rule. This rule has the same parameter settings as the previous rule except the Port Range parameter that is set to 1024/65535.

Follow these steps to configure your Windows operating system:

  1. Log on to the Windows Server 2016 operating system.
  2. Locate C:\Windows\System32\drivers\etc\hosts and open the hosts file.
  3. View the two IP addresses displayed on the Whitelist for Distributed Transaction tab of the Data Security page in the ApraraDB for RDS console. Add them at the end of the hosts file.
  4. Save the hosts file.
  5. Choose Control Panel > System and Security > Administrative Tools. Double-click Component Services.
  6. Choose Component Services > Computer > My Computer > Distributed Transaction Coordinator.
  7. Right-click Local DTC and select Properties.
  8. Click the Security tab and configure the required parameters.
  9. Click OK. In the MSDTC Service message, click Yes to wait for the MSDTC service to restart.

Initialize a new account set management tool

  1. Download the account set management tool of Kingdee K/3 WISE 15.0 or 15.
    Note Different Kingdee K/3 WISE versions require different account set management tools. Only the account set management tools of Kingdee K/3 WISE 15.0 and 15.1 are provided.
  2. Decompress the package and save it to the installation directory of Kingdee K/3 WISE K3 ERP\KDSYSTEM\KDCOM.
  3. Open Kingdee K/3 WISE.
  4. In the dialog box that appears, configure the identity verification and data server information.
    Note Configure the internal endpoint of the RDS instance for the data server.
  5. Configure the preset connection.
  6. Register the account set.
  7. Select the target database.

Log on to Kingdee K/3 WISE

After all the settings are complete, distributed transactions can be implemented between the ECS and RDS instances. You can then use Kingdee K/3 WISE properly.