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 RDS and ECS instances.

Solution

This solution consists of three steps:
  1. Restore account set data to RDS: Upload the full backup data of the Kingdee K/3 WISE account set database to OSS, and then restore the backup data to RDS.
  2. Allow distributed transactions: Adjust the access settings for RDS, ECS, and Windows to guarantee available ports for distributed transactions.
  3. Replace with a new account set management tool: Replace with a new account set management tool that is compatible with RDS.

Preparations

  • Install Kingdee K/3 WISE in an ECS instance deployed in Windows Server 2016.
  • Create an RDS for SQL Server instance. Prepare the full backup data of the Kingdee K/3 WISE account set database.
Note
  • The ECS instance for installing Kingdee must be in the same region and VPC as the RDS instance.
  • You must use one of the following instance editions of RDS for SQL Server:
    • SQL Server 2012/2016 Enterprise High-availability Edition
    • SQL Server 2012/2016 Standard Edition

Restore account set data to RDS

To upload a backup file of account set data, follow these steps:

  1. Log on to the OSS console.
  2. In the left-side navigation pane, click the Create Bucket icon to create a bucket.Create Bucket
  3. Set 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 is 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.
    Create Bucket dialog box
  4. Click OK.
  5. In the left-side navigation pane, click the bucket that you have created.
  6. Click the Files tab, and then click Upload.
  7. Drag the backup file to be uploaded to the Upload section, or click Upload and select the backup file.
    Note For more information about the parameters, see Upload an object.

To create a premier account, follow these steps:

  1. Log on to the ApsaraDB for RDS console.
  2. In the upper-left corner of the page, select the region where the target RDS instance is located.
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, click Accounts.
  5. Click Create Account.
  6. Set the following parameters.
    Parameter Description
    Database Account Enter a database account. The database account 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 letter or digit.
    Account Type Select Premier Account.
    Password Set the account password. The requirements are as follows:
    • It must be 8 to 32 characters in length.
    • It must contain three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • The allowed special characters are as follows:

      @ # $ % ^ & * ( ) _ + - =

    Re-enter Password Enter the password again.
    Note Enter your remarks.
  7. Click OK.

To migrate backup data from OSS to RDS, follow these steps:

  1. Log on to the ApsaraDB for RDS console.
  2. In the upper-left corner of the page, select the region where the target RDS instance is located.
  3. Find the target RDS instance and click the instance 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 is not visible, check your instance edition.
  6. Click Next twice to go to the Import Data tab.
  7. Set the following parameters.
    Parameter Description
    Database Name Enter the name of the destination database in the destination instance.
    OSS Bucket Select the OSS bucket where the backup file is located.
    OSS Subfolder Name Enter the name of the subfolder where the backup file is located.
    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 Plan Select Immediate Access.
    Consistency Check Mode Select Synchronous DBCC.
    Note If you are migrating backup data from OSS to RDS for the first time, RDS 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 set your RDS instance:

  1. Log on to the ApsaraDB for RDS console.
  2. In the upper-left corner of the page, select the region where the target RDS instance is located.
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, click Data Security.
  5. Click Edit on the right. In the dialog box that appears, enter the IP address of the ECS instance.
    Note
    • If the ECS and RDS instance are 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.
    • If the ECS and RDS instances are not in the same VPC, enter the public IP address of the ECS instance and apply for a public endpoint for the RDS instance.
  6. Click OK.
  7. Click the Whitelist for Distributed Transaction tab.
  8. Click Create Whitelist.
  9. Set the following parameters.
    Parameter Description
    Whitelist Name The whitelist 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 letter or digit.
    Whitelist Enter the IP address and Windows computer name of the ECS instance, and separate them 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 set your ECS instance:

  1. Log on to the ECS console.
  2. In the upper-left corner of the page, select the region where the target ECS instance is located.
  3. Find the target ECS instance and click the instance ID.
  4. In the left-side navigation pane, click Security Groups.
  5. Click Add Rules on the right.
  6. In the upper-right corner of the page, click Add Security Group Rule.
  7. Set the following parameters.
    Parameter Description
    Rule Direction Select Inbound.
    Action Select Allow.
    Protocol Type Select Customized TCP.
    Port Range Enter 135.
    Note 135 is the fixed port of the RPC service.
    Priority Enter 1.
    Authorization Type Select IPv4 CIDR Block.
    Authorization Objects View the two IP addresses displayed on the Whitelist for Distributed Transaction tab of the Data Security page. Enter them in Authorization Objects.
    Description It must be 2 to 256 characters in length and cannot start with http:// or https://.
  8. Click OK.
  9. Add another security group rule by entering 1024/65535 in Port Range and specifying the other parameters in the same way as the previous rule.

Follow these steps to set 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. Enter 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 choose Properties from the shortcut menu.
  8. Click the Security tab and set the required parameters.
  9. Click OK. In the MSDTC Service message that appears, click Yes to wait for the MSDTC service to restart.

Replace with a new account set management tool

Replace with a new account set management tool, and then use it to register and enable an account set for RDS. For more information, see Attachment.
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.

Next step

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 normally.