You can connect to an ApsaraDB MyBase for SQL Server instance over an internal network or the Internet. By default, ApsaraDB MyBase for SQL Server provides a private endpoint for you to connect to your instance. If you want to connect to the instance over the Internet, apply for a public endpoint. This topic describes how to apply for a public endpoint for an instance and release the public endpoint of an instance.

Private and public endpoints

Endpoint type Description
Private endpoint
  • By default, ApsaraDB MyBase for SQL Server provides a private endpoint for you to connect to your instance. The private endpoint cannot be released. You do not need to apply for a private endpoint.
  • If you deploy your application on an Elastic Compute Service (ECS) instance that is deployed in the same region and uses the same network type as your ApsaraDB MyBase for SQL Server instance, the two instances can communicate with each other over an internal network and you do not need to apply for a public endpoint.
  • For security purposes, we recommend that you use the private endpoint to connect to your ApsaraDB MyBase for SQL Server instance.
Public endpoint
  • You must manually apply for a public endpoint for your ApsaraDB MyBase for SQL Server instance. You can release the public endpoint if it is no longer needed.
  • If you cannot connect to your ApsaraDB MyBase for SQL Server instance over an internal network, you must apply for a public endpoint. In the following scenarios, you must apply for a public endpoint:
    • You want to connect to an ApsaraDB MyBase for SQL Server instance from an ECS instance, and the two instances are deployed in different regions or use different network types.
    • You want to connect to an ApsaraDB MyBase for SQL Server instance from a third-party device.
Note
  • You are not charged for applying for a public endpoint. You are also not charged for the traffic that is generated after you use the public endpoint to connect to your instance over the Internet.
  • If you use the public endpoint to connect to an ApsaraDB MyBase for SQL Server instance, data security is reduced. Proceed with caution.
  • We recommend that you migrate your application to an ECS instance that is deployed in the same region and uses the same network type as your ApsaraDB MyBase for SQL Server instance. This allows you to use the private endpoint to connect to the ApsaraDB MyBase for SQL Server instance. The private connection accelerates transmission and improves data security.

Procedure

  1. Log on to the ApsaraDB MyBase console.
  2. In the upper-left corner of the page, select the region where you want to create a dedicated cluster.
  3. In the left-side navigation pane, choose Instances > SQL Server.
  4. Find the instance that you want to release and click Details in the Actions column.
  5. In the left-side navigation pane, click Database Connection.
  6. Apply for or release a public endpoint.
    • To apply for a public endpoint, click Apply for Public Endpoint.
    • To release your public endpoint, click Release Public Endpoint.
      Note After the public endpoint is released, you cannot use the public endpoint to connect to the instance. Proceed with caution.
  7. In the message that appears, click OK.