Buying a Microsoft SQL Server Instance and Connecting to It Using the SSMS Client
You can connect to your RDS for SQL Server instance using a Windows ECS with SQL Server Management Studio installed over a private network.
You can connect to a DB instance through a non-SSL connection or an SSL connection using the RDS for SQL Server client. The SSL connection encrypts data and is more secure.
This section describes how to connect to a DB instance with SSL disabled. To connect to a DB instance with SSL enabled, see Connecting to an RDS for SQL Server Instance Through a Private Network.
Operation Process
| Procedure | Description |
|---|---|
| Specify configurations and buy a DB instance. | |
| If you want to use an SSMS client to connect to a DB instance, you need to prepare a server, install the SQL Server Management Studio on the server, and run the connection command. Create a Linux ECS that is in the same region and VPC as your instance. | |
| Step 3: Test Connectivity and Install SQL Server Management Studio | Test the network connectivity between the ECS and the floating IP address and port of the instance, and install SQL Server Management Studio on the ECS. |
| Step 4: Connect to the DB Instance Using SQL Server Management Studio | Use a command-line interface (CLI) to connect to the instance through its floating IP address and port. |
Step 1: Buy a Microsoft SQL Server Instance
- Log in to the management console.
- Click
in the upper left corner and select a region and a project. - Click
in the upper left corner of the page and choose Database > Relational Database Service. - On the Instances page, click Buy DB Instance.
- On the Buy DB Instance page, set instance information and click Buy Now.
- Basic settings
Table 1 Basic settings Parameter
Description
Region
Region where your resources are located.
NOTE:Products in different regions cannot communicate with each other through a private network. After a DB instance is created, the region cannot be changed. Therefore, exercise caution when selecting a region.
DB Instance Name
Must start with a letter and consist of 4 to 64 characters. Only letters (case-sensitive), digits, hyphens (-), and underscores (_) are allowed.
- If you intend to create multiple DB instances and read replicas at a time, the allowed length for each instance name will change.
- If you buy multiple DB instances at a time, their names will include a four-digit suffix. For example, if you specify instance here, the names will be instance-0001, instance-0002, and so on. If existing instances' suffixes have already reached up to 0010, the new instance names will start from instance-0011.
DB Engine
Select Microsoft SQL Server.
DB Engine Version
For details, see DB Engines and Versions.
Supported DB engine versions may vary by region. For the actual options, see them on the console.
For RDS for SQL Server, select an appropriate DB engine version tailored to your workloads. You are advised to select the latest available version because it is more stable, reliable, and secure.
DB Instance Type
- Primary/Standby: uses an HA architecture with a primary DB instance and a synchronous standby DB instance. It is suitable for production databases of large- and medium-sized enterprises in Internet, Internet of Things (IoT), retail e-commerce sales, logistics, gaming, and other sectors. When a primary instance is being created, a standby instance is provisioned along with it to provide data redundancy. The standby instance is invisible to you after being created.
- Single: uses a standalone architecture, which is less expensive than primary/standby DB instances. It is recommended for development and testing of microsites, and small and medium enterprises, or for learning about RDS.
AZ
An AZ is a physical region where resources use independent power supplies and networks. AZs are physically isolated but interconnected through an internal network.
To achieve high reliability, RDS will automatically deploy your primary and standby instances in different physical servers even if you deploy them in the same AZ. If you attempt to deploy your primary and standby instances in the same AZ in a Dedicated Computing Cluster (DCC) and there is only one physical server available, the creation will fail.
You can deploy your primary and standby instances in a single AZ or across AZs to implement failover and high availability.
Storage Type
Determines the instance read/write speed. A higher maximum throughput enables faster I/O operations.
Ultra-high I/O: uses the SSD disk type that supports a maximum throughput of 350 MB/s.
Time Zone
Select a time zone based on the region your instance will be hosted in. After an instance is created, the time zone cannot be modified.
Character Set
Defines a collation of a database or table column, or a collation cast operation when applied to character string expression. It acts as the default collation for the DB instance.
- Specifications and storage
Table 2 Specifications and storage Parameter
Description
Instance Class
Refers to the vCPU and memory of a DB instance. Different instance classes support different numbers of database connections and maximum IOPS.
For details about instance classes, see RDS for SQL Server Instance Classes.
After a DB instance is created, you can change its instance class. For details, see Changing a DB Instance Class.
Storage Space
Contains the system overhead required for inodes, reserved blocks, and database operation. Storage space can range in size from 40 GB to 4,000 GB and can be scaled up only by a multiple of 10 GB.
After a DB instance is created, you can scale up its storage space. For details, see Scaling Up Storage Space.
Disk Encryption
- Disable: Encryption is disabled.
- Enable: Encryption is enabled, which improves data security but affects system performance.
If you select this option, the Key Name parameter appears. Select an existing key or create a new one as the tenant key.
NOTE:- If you enable disk encryption during instance creation, the disk encryption status and the key cannot be changed later. Disk encryption will not encrypt backup data stored in OBS buckets.
- If disk encryption is enabled, keep the key secure. Once the key is disabled, deleted, or frozen, your instance will be inaccessible and data may not be restored.
- For details about how to create a key, see "Creating a CMK" in Data Encryption Workshop User Guide.
- Network and database configurations
Table 3 Network Parameter
Description
VPC
A virtual network in which your RDS instances are located. A VPC can isolate networks for different workloads. You can select an existing VPC or create a VPC. For details about how to create a VPC, see "Creating a VPC" in Virtual Private Cloud User Guide.
If no VPC is available, RDS allocates a VPC to you by default.
NOTICE:After a DB instance is created, the VPC cannot be changed.
Subnet
Improves network security by providing dedicated network resources that are logically isolated from other networks. Subnets are only valid within a specific AZ. Dynamic Host Configuration Protocol (DHCP) is enabled by default for subnets where you plan to create DB instances and cannot be disabled.
A floating IP address is automatically assigned when you create an RDS instance. You can also enter an unused floating IP address in the subnet CIDR block. After the DB instance is created, the floating IP address cannot be changed.
Security Group
Enhances security by controlling access to RDS from other services. Ensure that the security group you select allows the client to access the DB instance.
When creating a DB instance, you can select multiple security groups. For better network performance, select no more than five security groups. If you select more than one security group, the access rules of all the selected security groups apply on the instance.
If no security group is available, RDS allocates a security group to you by default.
Table 4 Database configuration Parameter
Description
Administrator
The default login name for the database is rdsuser.
Administrator Password
The new password must consist of 8 to 32 characters and contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters (~!@#$%^*-_+?,). Enter a strong password and periodically change it for security reasons.
If the password you provide is considered weak by the system, you will be prompted to provide a stronger password.
Keep this password secure. The system cannot retrieve it.
After a DB instance is created, you can reset this password. For details, see Resetting the Administrator Password.
Confirm Password
Must be the same as Administrator Password.
Parameter Template
Contains engine configuration values that can be applied to one or more DB instances of the same DB engine. If you intend to create a primary/standby DB pair, they use the same parameter template. You can modify the instance parameters as required after the DB instance is created.
NOTICE:If you use a custom parameter template when creating a DB instance, the specification-related parameter max server memory (MB) in the custom template is not delivered. Instead, the default value is used.
After an instance is created, you can adjust its parameters as needed. For details, see Modifying RDS for SQL Server Instance Parameters.
Enterprise Project
If your account has been associated with an enterprise project, select the target project from the Enterprise Project drop-down list.
- Tags
Table 5 Tag Parameter
Description
Tag
Tags an RDS instance. This parameter is optional. Adding tags to RDS instances helps you better identify and manage the instances. Up to 20 tags can be added for each DB instance.
If your organization has configured tag policies for RDS, add tags to DB instances based on the policies. If any tag you add does not comply with the policies, DB instance creation may fail. Contact your organization administrator to learn more about tag policies.
After a DB instance is created, you can view its tag details on the Tags page. For details, see RDS for SQL Server Tags.
- Batch creation
Table 6 Batch creation Parameter
Description
Quantity
RDS supports DB instance creation in batches. If you choose to create primary/standby DB instances and set Quantity to 1, a primary DB instance and a standby DB instance will be created synchronously.
If you create multiple DB instances at a time, their names will include a four-digit suffix. For example, if you specify instance here, the names will be instance-0001, instance-0002, and so on. If existing instances' suffixes have already reached up to 0010, the new instance names will start from instance-0011.
The performance of your RDS instance depends on its configurations. The hardware configuration items you can choose include the instance class, storage type, and storage space.
- Basic settings
- Confirm the instance specifications.
- If you need to modify your settings, click Previous.
- If you do not need to modify your settings, click Submit.
- To view and manage your instance, go to the Instances page.
- When your DB instance is being created, the status is Creating. The status changes to Available after the instance is created.
- The system automatically enables an automated backup policy for the instance during creation. You can modify the policy, if needed, after the instance is created. The system automatically creates a full backup once an instance is created.
- After a DB instance is created, you can enter a description for it.
- The default database port is 1433. You can change it after a DB instance is created.
For details, see Changing a Database Port.
Step 2: Create an ECS
- Log in to the management console and check whether there is an ECS available.
- Create an ECS and select Windows as its OS.
To download SQL Server Management Studio to the ECS, bind an EIP to the ECS. The ECS must be in the same region, VPC, and security group as the RDS for SQL Server DB instance for mutual communications.
For details about how to purchase a Windows ECS, see "Purchasing an ECS" in Elastic Cloud Server User Guide.
- On the ECS Information page, view the region and VPC of the ECS.
- On the Basic Information page of the RDS for SQL Server instance, view its region and VPC.
- Check whether the ECS and RDS for SQL Server instance are in the same region and VPC.
- If yes, go to Step 3: Test Connectivity and Install SQL Server Management Studio.
- If they are not in the same region, purchase another ECS or DB instance. The ECS and DB instance in different regions cannot communicate with each other. To reduce network latency, deploy your DB instance in the region nearest to your workloads.
- If they are in different VPCs, change the VPC settings of the ECS. For details, see "Changing a VPC" in Elastic Cloud Server User Guide.
Step 3: Test Connectivity and Install SQL Server Management Studio
- Log in to the ECS. For details, see "Logging In to a Windows ECS Using VNC" in Elastic Cloud Server User Guide.
- On the Instances page of the RDS console, click the DB instance name to go to the Basic Information page.
- In the Connection Information area, obtain the floating IP address and database port of the DB instance.
- Open the cmd window on the ECS and check whether the floating IP address and database port of the RDS for SQL Server instance can be connected.
- If yes, network connectivity is normal.
- If no, check the security group rules.
- If in the security group of the ECS, there is no outbound rule with Destination set to 0.0.0.0/0 and Protocol & Port set to All, add an outbound rule for the floating IP address and port of the DB instance.
- If in the security group of the DB instance, there is no inbound rule allowing the access from the private IP address and port of the ECS, add an inbound rule for the private IP address and port of the ECS.
- Open a browser on the ECS, visit the Microsoft website, and download the installation package, for example, SQL Server Management Studio 18.0.
- Double-click the installation package and complete the installation as instructed.
Step 4: Connect to the DB Instance Using SQL Server Management Studio
- Start SQL Server Management Studio.
- Choose Connect > Database Engine. In the displayed dialog box, enter login information. Figure 1 Connecting to the server
Table 7 Parameter description Parameter
Description
Server name
Floating IP address and database port obtained in 3.
Authentication
Authentication mode. Select SQL Server Authentication.
Login
Name of the account used to access the DB instance. The default value is rdsuser.
Password
Password of the account.
- Click Connect to connect to the DB instance.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot