This topic describes how to connect an Elastic Cloud Service (ECS) instance that runs Kingdee K/3 WISE 15.0 or 15.1 to an ApsaraDB RDS for SQL Server instance. After the connection is established, you can run distributed transactions between the RDS instance and the ECS instance.

Solution description

This solution consists of three steps:
  1. Upload a full backup file of the specified Kingdee K/3 WISE set of books to an Object Storage Service (OSS) bucket. Then, restore the data from the full backup file to the RDS instance. For more information, see Restore data to the RDS instance.
  2. Modify the access settings of the RDS instance, ECS instance, and Windows operating system. This allows you to smoothly run distributed transactions between the RDS instance and the ECS instance. For more information, see Enable distributed transactions.
  3. Replace the old accounting data management tool with a new one that is compatible with ApsaraDB RDS for SQL Server. For more information, see Initialize the new accounting data management tool.

Preparations

  • Install Kingdee K/3 WISE on an ECS instance that runs Windows Server 2016.
  • Create an RDS instance. For more information, see Create an ApsaraDB RDS for SQL Server instance.
  • Obtain the full backup data of the Kingdee K/3 WISE set of books.
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 2019 SE on RDS High-availability Edition
    • SQL Server 2017 SE on RDS High-availability Edition
    • SQL Server 2012 EE or SQL Server 2016 EE on RDS High-availability Edition
    • SQL Server 2012 SE or SQL Server 2016 SE on RDS High-availability Edition

Restore data to the RDS instance

Perform the following steps to upload a full backup file of the set of books to an OSS bucket:

  1. Log on to the OSS console.
  2. In the left-side navigation pane, click Buckets. On the Buckets page, click Create Bucket.
  3. Configure the following parameters.
    ParameterDescription
    Bucket NameEnter a name for the bucket.
    RegionSelect the region in which you want to create the bucket. Make sure that the bucket resides in the same region as the ECS instance and RDS instance.
    Storage ClassSelect IA.
    RedundancySelect LRS.
    VersioningSelect Not Activated.
    Access Control List (ACL)Select Private.
    Encryption MethodSelect None.
    Real-time Log QuerySelect Not Activated.
    Note For more information about parameters, see Create buckets.
  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 left-side navigation pane of the page, click Files. On the page that appears, click Upload.
  7. Drag the full backup file that you want to upload to the Files to Upload field. Alternatively, click Select Files and select the full backup file.
    Note For more information about parameters, see Upload objects.
    Upload a file

Create a privileged account for the RDS instance

  1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
  2. In the left-side navigation pane, click Accounts.
  3. Click Create Account.
  4. Configure the following parameters.
    ParameterDescription
    AccountEnter a username for the account. The username must be 2 to 16 characters in length and can contain lowercase letters, digits, and underscores (_). The username must start with a lowercase letter and end with a lowercase letter or digit.
    Account TypeSpecify the type of the account. Select Privileged Account.
    PasswordEnter a password for the account. The password must meet the following requirements:
    • The password is 8 to 32 characters in length.
    • The password contains at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters.
    • The password can contain the following special characters: ! @ # $ % ^ & * ( ) _ + - =
    Confirm PasswordEnter the password for the account again.
    DescriptionEnter a description that helps identify the account.
  5. Click OK.

Restore the full backup file from the OSS bucket to the RDS instance

  1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
  2. In the left-side navigation pane, click Backup and Restoration. On the page that appears, click Migrate OSS Backup Data to RDS.
    Note If this button does not appear, check whether the SQL Server version and edition of the RDS instance meet requirements. For more information, see Preparations.
  3. Click Next twice to go to the Import Data step.
  4. Configure the following parameters.
    ParameterDescription
    Database NameEnter the name of the destination database on the RDS instance.
    OSS BucketSelect the OSS bucket in which the full backup file is stored.
    OSS Subfolder NameEnter the name of the subfolder in which the full backup file is stored.
    OSS FileSpecify the full backup file that you want to import. You can enter a prefix in the search box and click the search icon to search for the full backup file in fuzzy match mode. The system displays the name, size, and update time of each full backup file that is returned. Select the backup file that you want to migrate to the RDS instance.
    Cloud Migration MethodSelect Immediate Access (Full Backup).
    Consistency Check ModeSelect Synchronous DBCC.
    Note If you migrate backup data from OSS to ApsaraDB RDS for the first time, the system prompts you to authorize ApsaraDB RDS to access your resources in OSS. In this case, click Authorize and then Confirm Authorization Policy.
  5. Click OK.
    Note Wait until the full backup file is imported into the destination database on the RDS instance. You can click Databases in the left-side navigation pane to view the status of the destination database.

Enable distributed transactions

Configure the RDS instance

  1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
  2. In the left-side navigation pane, click Whitelists and SecGroup. On the Whitelist Settings tab of the page that appears, click Modify to the right of the IP address whitelist that is labeled default and add the IP address of the ECS instance to the whitelist.
    Note
    • If the ECS instance and RDS instance 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 instance and RDS instance reside in different VPCs, you must enter the public IP address of the ECS instance. You must also apply for a public endpoint for the RDS instance. For more information, see Apply for a public endpoint for an RDS SQL Server instance.
    IP address
  3. Click OK.
  4. In the left-side navigation pane, click Data Security. On the page that appears, click the Whitelist for Distributed Transaction tab.
  5. Click Create Whitelist.
  6. Configure the following parameters and click OK.
    ParameterDescription
    Whitelist NameEnter a name for the whitelist. The name must be 2 to 32 characters in length and can contain digits, lowercase letters, and underscores (_). The name must start with a lowercase letter and end with a lowercase letter or digit.
    IP AddressesEnter the IP address of the ECS instance and the name of the Windows computer on which the ECS instance resides. Separate the IP address and the computer name with a comma (,). Example: 192.168.1.100,k3ecstest.

    If you want to enter more than one entry, make sure that each entry is in a different line.

    Note To view the computer name, open Control Panel of your computer and choose System and Security > System.

Configure the ECS instance

  1. Log on to the ECS console.
  2. In the top navigation bar, select the region in which the ECS instance resides.
  3. Find the RDS instance and click the ID of the instance.
  4. Click the Security Groups tab.
  5. Find the security group and click Add Rules in the Actions column.
  6. On the Inbound tab, click Add Rule.
  7. Configure the following parameters.
    ParameterDescription
    ActionSelect Allow.
    PriorityEnter 1.
    Protocol TypeSelect Custom TCP.
    Port RangeEnter 135.
    Note Port 135 is the fixed port for the Remote Procedure Call (RPC) service.
    Authorization ObjectEnter the two IP addresses of the RDS instance in the Authorization Object field. You can view these IP addresses on the Whitelist for Distributed Transaction tab of the Data Security page in the ApsaraDB RDS console. Whitelist for Distributed Transaction
    DescriptionEnter 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. Set the Port Range parameter for this rule to 1024/65535 and use the same settings of other parameters as the previous rule.

Configure your Windows operating system

  1. Log on to the Windows Server 2016 operating system.
  2. Open the hosts file in the C:\Windows\System32\drivers\etc directory.
  3. Enter the two IP addresses of the RDS instance at the end of the hosts file. You can view these IP addresses on the Whitelist for Distributed Transaction tab of the Data Security page in the ApsaraDB RDS console. Whitelist for Distributed Transaction
  4. Save the hosts file.
  5. Open Control Panel of your computer, choose System and Security > Administrative Tools, and then 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 parameters.
  9. Click OK. In the MSDTC Service message, click Yes. Then, wait for the MSDTC service to restart.

Initialize the new accounting data management tool

  1. Download the software package of the accounting data management tool that is used with Kingdee K/3 WISE 15.1 or 15.0.
    Note Different Kingdee K/3 WISE versions require different accounting data management tools. Only the accounting data management tools of Kingdee K/3 WISE 15.0 and 15.1 are provided.
  2. Decompress the package and save it to the following installation directory of Kingdee K/3 WISE: K3ERP\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 set of books.
  7. Select the specified database.

Log on to Kingdee K/3 WISE

After all the settings are complete, you can run distributed transactions between the ECS and RDS instances. In addition, you can then log on to and use Kingdee K/3 WISE.