All Products
Search
Document Center

ApsaraDB RDS:Create a database

Last Updated:Jun 03, 2024

Before you can use an ApsaraDB RDS instance, you must create a database on the instance. This topic describes how to create a database on an ApsaraDB RDS for SQL Server instance.

Prerequisites

An RDS instance is created. For more information, see Create an ApsaraDB RDS for SQL Server instance.

Usage notes

An RDS instance that runs SQL Server 2008 R2 supports up to 50 databases. If your RDS instance runs other SQL Server versions, the maximum number of databases varies based on the RDS edition. You can use the following formulas to calculate the maximum number of databases:

  • RDS Cluster Edition/RDS High-availability Edition

    You must extract the square root of the number of CPU cores, round the square root down to the integer, and then multiply the integer by 50. Assume that the obtained value is X. In this example, the maximum number of databases equals the smaller value between X and 300. For example, if your RDS instance runs SQL Server 2016 SE on RDS High-availability Edition and provides 4 CPU cores and 8 GB of memory, the RDS instance supports a maximum of 100 databases.

  • RDS Basic Edition

    You must extract the square root of the number of CPU cores, round the square root down to the integer, and then multiply the integer by 100. Assume that the obtained value is X. In this example, the maximum number of databases equals the smaller value between X and 400. For example, if your RDS instance runs SQL Server 2019 SE on RDS Basic Edition and provides 4 CPU cores and 8 GB of memory, the RDS instance supports a maximum of 200 databases.

Note

min in the preceding formulas indicates that the smaller value between two values is used. For example, the value of min{100,300} is 100.

Procedure

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
  2. In the left-side navigation pane, click Databases.

  3. On the page that appears, click Create Database and configure the following parameters.

    Parameter

    Description

    Database Name

    The name of the database. The name must be 2 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter and end with a letter or a digit.

    Supported Character Set

    The character set of the database.

    Description

    The description of the database. The description can be up to 256 characters in length.

  4. Click Create.

References

  • You can also create a database on an RDS instance by calling an API operation. For more information, see CreateDatabase.

  • You can connect to an RDS instance by using various methods such as Data Management (DMS) and Microsoft SQL Server Management Studio (SSMS). For more information, see Connect to an ApsaraDB RDS for SQL Server instance.

FAQ

What do I do if the error message Due to the limit number you can't create a database is displayed when I create a database on my RDS instance?

  • The error message is displayed because the number of databases that you can create on your RDS instance reaches the upper limit supported by the current instance specifications. The number of databases that you can create on an RDS instance is restricted by the specifications of the RDS instance. For more information about how to calculate the maximum number of databases that you can create on the RDS instance, see Usage notes.

  • You can upgrade the specifications of your RDS instance to increase the maximum number of databases that you can create on the RDS instance. For more information, see Change instance specifications.