How do I create an instance and connect to a database?
You can manage databases in the SQL Server Management Console page. For detailed directions, see Creating and Connecting to Database.
How do I connect to TencentDB for SQL Server?
1. To connect to TencentDB for SQL Server from a Windows CVM instance, we recommend you connect over the private network, which has a higher transfer speed and security. The following three prerequisites must be met before you can do so:
The CVM and TencentDB for SQL Server instances are under the same Tencent Cloud root account.
The CVM and TencentDB for SQL Server instances are in the same region.
The CVM and SQL Server network types are both VPC and are in the same VPC, or the CVM and SQL Server network types are both in the classic network.
For more information, see Connecting to SQL Server Instance from Windows CVM.
If the CVM and SQL Server are under different Tencent Cloud root accounts, in different regions under the same root account, or in different VPCs in the same region under the same root account, we recommend using CCN for interconnection.
2. If connecting to TencentDB for SQL Server from a local network, it is recommended to use VPN, Direct Connect, or CCN for intercommunication, ensuring high security and reliable network latency. If cost is a consideration, public network intercommunication is possible, including directly enabling a public network address and using CLB to enable the public network in the console. For more details, please refer to Connecting to SQL Server Instances from a Local Network.
If your TencentDB for SQL Server instance is in the dual-node (original High-Availability/Cluster Edition), you can use CLB to enable public network access.
How do I access a TencentDB for SQL Server instance from a CVM instance over the private network?
To connect to a TencentDB for SQL Server instance from a CVM instance over the private network, the following three prerequisites must be met:
The CVM and TencentDB for SQL Server instances are under the same Tencent Cloud root account.
The CVM and TencentDB for SQL Server instances are in the same region.
The CVM and SQL Server network types are both VPC and are in the same VPC, or the CVM and SQL Server network types are both in the classic network.
What should I check when interconnecting a CVM instance and a TencentDB for SQL Server instance over the private network?
To connect to a TencentDB for SQL Server instance from a CVM instance over the private network, the following three prerequisites must be met:
The CVM and TencentDB for SQL Server instances are under the same Tencent Cloud root account.
The CVM and TencentDB for SQL Server instances are in the same region.
The CVM and SQL Server network types are both VPC and are in the same VPC, or the CVM and SQL Server network types are both in the classic network.
How do I view the private network address of a TencentDB for SQL Server instance?
Log in to SQL Server Console, view in the instance list, or click the instance ID to enter the instance details page.
How do I access a TencentDB for SQL Server instance from a CVM instance under another Tencent Cloud root account?
CVM and TencentDB for SQL Server instances under different accounts cannot interconnect over the private network. We recommend migrating the TencentDB for SQL Server instance to the CVM owner's account.
If you need to keep the CVM and TencentDB for SQL Server under different Tencent Cloud accounts, ensure their network types are both VPC, and create CCN between the two VPCs for interconnection through CCN .
How do I interconnect a CVM instance and a TencentDB for SQL Server instance in different regions under the same Tencent Cloud root account over the private network?
CVM instances and TencentDB for SQL Server instances in different regions cannot interconnect over the private network. Only instances in the same region can interconnect over the private network, either in the same or different Availability Zones.
If you need to keep the CVM and TencentDB for SQL Server in different regions, ensure their network types are both VPC, and create CCN between the two VPCs for interconnection through CCN .
How do I interconnect a CVM instance and a TencentDB for SQL Server instance in different VPCs in the same region under the same Tencent Cloud root account over the private network?
CVM instances and TencentDB for SQL Server instances in different VPCs cannot interconnect over the private network. We recommend migrating the TencentDB for SQL Server instance to the VPC of the CVM instance.
If you need to keep the CVM and TencentDB for SQL Server in different VPCs, create CCN between the two VPCs for interconnection through CCN .
How do I interconnect a CVM instance and a TencentDB for SQL Server instance in different types of networks in the same region under the same Tencent Cloud root account over the private network?
CVM and TencentDB for SQL Server instances in different types of networks cannot interconnect over the private network. We recommend you change the classic network of the CVM or TencentDB for SQL Server instance to VPC and ensure that the instances are in the same VPC for interconnection over the private network.
How do I interconnect a CVM instance and a TencentDB for SQL Server instance in different AZs in the same region under the same Tencent Cloud root account over the private network?
CVM and TencentDB for SQL Server instances in different AZs in the same region may or may not be in the same VPC.
If they are in different AZs in the same VPC, they can interconnect over private network.
If the VPCs are different, they cannot interconnect directly over the private network. You need to change the VPC network to ensure the CVM and TencentDB for SQL Server are in the same VPC. For details, see Changing Network (VPC to VPC).
Can I interconnect a CVM instance and a TencentDB for SQL Server instance in different AZs in the same VPC under the same Tencent Cloud root account?
Yes. Instances in different AZs but in the same VPC interconnect over private network by default.
How do I access a TencentDB for SQL Server instance from a local server?
If connecting from a local server to TencentDB for SQL Server, it is recommended to use VPN, Direct Connect, or CCN for intercommunication, offering high security and guaranteed network latency.
For cost considerations, using the public network for intercommunication is an option, including directly enabling a public network address and using CLB to enable the public network in the console. For more details, please refer to Connecting to SQL Server Instances from a Local Network.
If your TencentDB for SQL Server instance is in the dual-node (original High-Availability/Cluster Edition), you can use CLB to enable public network access.
How do I connect to a TencentDB for SQL Server instance without a CVM instance?
Without a CVM instance, we recommend using VPN or Direct Connect or CCN for network interconnection to connect to TencentDB for SQL Server. For details, see Connecting to SQL Server Instance from Local System.
How do I switch a TencentDB for SQL Server instance from VPC A to VPC B?
How do I switch between the classic network and VPC for a TencentDB for SQL Server instance?
TencentDB for SQL Server only supports switching from Basic Network to VPC, see Basic Network to VPC. The Basic Network will be phased out in December 2022, switching from VPC to Basic Network is not supported.
How do I migrate a TencentDB for SQL Server instance from classic network to VPC?
How do I enable public network access for a TencentDB for SQL Server instance?
For cloud database instances with dual nodes (formerly high-availability/standard editions), external network addresses can be directly enabled through the console, or external network services can be opened via CLB. For details, see: Enabling or Disabling External Network Addresses through the Console or Binding CLB to Enable External Network Services.
How do I use the port mapping feature of SSH2 to connect to and manage a TencentDB for SQL Server instance from the internet?
For security reasons, if external network addresses cannot be opened for business, port mapping with SSH2 can be used for connecting to the instance from the external network for configuration and management. For specifics, see Connecting to SQL Server Instance from Local with Port Mapping Using Linux CVM with an External Network IP.
Does my application need to support automatic reconnection to TencentDB for SQL Server?
We recommend you configure automatic reconnection for your application for a higher availability. After a database is switched or migrated, the application can recover automatically with no manual intervention needed. We also recommend you use a persistent connection to connect your application to the database, as non-persistent connections consume many resources and compromise the performance.
Can I access a TencentDB for SQL Server replica instance?
TencentDB for SQL Server supports the mode of primary + replica + read-only instances. Only the primary and read-only instances can be accessed, while the replica instance is used for backup only and doesn't support business access.
Will a primary/replica switch affect the connection address?
A primary/replica switch won't change the connection address, but the IP address on the backend will change. There will be a momentary disconnection during the switch.
How do I configure a security group in TencentDB for SQL Server?
A security group is a stateful virtual firewall with filtering features, used for setting network access control for one or more cloud databases, an important means of network security isolation provided by Tencent Cloud. It is a logical grouping where you can add cloud database instances within the same region and with the same network security isolation needs to the same security group.
Cloud databases share the security group list with CVMs etc., with in-group rule-based matching, for details see Configuring Security Groups.
Can I use a security group in TencentDB for SQL Server to control the classic network?
TencentDB for SQL Server security groups currently only support network access control for VPCs and public network but not the classic network.
Can I select the SQL Server (1433) port as the type when adding an inbound rule to a security group?
When adding a security group rule, select SQL Server(1433) under Type to open port 1433, for details see Configuring Security Groups.
How do I set the instance maintenance time in TencentDB for SQL Server?
You can log in to SQL Server Console, in the instance list, click on the instance ID to enter the instance detail page, at Maintenance Information, click Modify, for details see Setting Instance Maintenance Information.
Will TencentDB for SQL Server be disconnected during the maintenance?
During the maintenance of TencentDB for SQL Server, in case of data migration, there might be second-level database connection interruptions during instance switching. Please ensure that your service has a reconnection mechanism, for details see Setting Instance Maintenance Information.
Why can't I connect to TencentDB for SQL Server?
Troubleshoot as follows if you can't connect to TencentDB for SQL Server:
Check if CVM can normally connect to the TencentDB for SQL Server instance's port address.
telnet <Connection Address> <Port Number>. If communication is possible, the network is normal. If not, check if the CVM and TencentDB for SQL Server instance are in the same VPC and are using the same security group. For internal network connections, CVM and TencentDB for SQL Server instances must be in the same VPC and can only connect through CVM.Check if the connection IP and port number are correct. Note that a "comma" separates the IP and port number.
Check whether the status of the TencentDB for SQL Server instance is abnormal.
Check whether the database username and password are correct and try resetting the password.
Try restarting the TencentDB for SQL Server instance and check whether the problem is resolved.
How to troubleshoot a failed TencentDB for SQL Server connection?
1. Failed to connect to the SQL Server instance from Windows CVM.
Troubleshoot network issues
Check whether the CVM and TencentDB for SQL Server instances are in the same VPC in the same region.
Check the security group rules. When accessing the database inside the security group from outside, you need to add the corresponding inbound direction rules to the security group. Check the CVM security group, CVM internal firewall, CVM internal security policies (other custom security policies), and ensure the 1433 port number for the specified database instance IP is open.
Test on the CVM to see if it can normally connect to the port of the TencentDB for SQL Server instance address.
telnet <connection address> <port number>. If communication is successful, it indicates that the network is functioning properly.Troubleshoot instance issues
If the network is normal, check the instance monitoring information in the console. If the instance load is too high or there is no or intermittent monitoring data, the instance is abnormal.
2. Failed to connect to the SQL Server instance from a local IDC.
Troubleshoot network issues
To connect from a local server to a cloud database instance, it is necessary to establish network connectivity from on-premises to the cloud. It is recommended to use VPN, dedicated line, or CCN for network interconnection, which offers high security and reliable network latency.
Test on the server to see if it can normally connect to the port of the TencentDB for SQL Server instance address.
telnet <connection address> <port number>. If communication is successful, it indicates that the network is functioning properly.If telnet fails, the network is disconnected, and you need to check local security group policies and VPC routing configurations, open port 1433 for the specified database IP, and perform online and offline CVM instance connectivity tests.
Troubleshoot instance issues
If the network is normal, check the instance monitoring information in the console. If the instance load is too high or there is no or intermittent monitoring data, the instance is abnormal.