This topic describes how to create an account and a database for an ApsaraDB RDS instance that runs SQL Server 2008 R2. You can create accounts and databases by using the ApsaraDB RDS console.

Prerequisites

Your RDS instance runs SQL Server 2008 R2.

Note For more information about how to create an account and a database for an RDS instance that runs a different SQL Server version, see the following topics:

Create an account

Precautions

  • The databases that are created on an RDS instance share all the resources that belong to the RDS instance. You can manage standard accounts and databases by using SQL statements.
  • You must follow the principle of least privilege to create accounts and grant the read-only permissions or the read and write permissions to the accounts based on the required roles. If necessary, you can create more than one account and grant each account the permissions to access only the data within its authorized workloads on a specific database. If an account does not need to write data to a database, we recommend that you grant only the read-only permissions on the database to the account.
  • For security purposes, we recommend that you configure strong passwords for the created accounts and change the passwords on a regular basis.

Procedure

  1. Go to the Accounts page.
    1. Log on to the RDS management console, click on the left Instances , and then select a region above.
      Select a region
    2. Find your RDS instance and click its ID. In the left-side navigation pane, click Accounts.
  2. Click Create Account.
  3. Configure the following parameters.
    Parameter Description
    Database Account
    • The username of the account must be 2 to 64 characters in length and can contain lowercase letters, digits, and underscores (_).
    • The username of the account must start with a lowercase letter and end with a lowercase letter or a digit.
    • The username cannot be the same as the username of an existing account.
    Account Type
    • If your RDS instance uses local SSDs, select Standard Account.
    • If your RDS instance uses standard or enhanced SSDs, select Privileged Account or Standard Account.
    Authorized Databases Select the authorized databases of the account. If no databases are created, you can leave this parameter empty.

    You can perform the following steps to grant the permissions on more than one database to the account:

    1. In the Unauthorized Databases section, select the required databases.
    2. Click the > icon to move the selected databases to the Authorized Databases: section.
    3. In the Authorized Databases section, specify the permissions that the account will be granted on each authorized database. The supported permissions are Read/Write and Read-only.
    Password

    Enter the password of the account. The password must meet the following requirements:

    • The password must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • The password can contain any of the following special characters: ! @ # $ % ^ & * ( ) _ + - =
    Confirm Password Enter the password of the account again.
    Description Enter a description that helps identify the account. The description can be up to 256 characters in length.
  4. Click OK.

Create a database

  1. Go to the Databases page.
    1. Log on to the RDS management console, click on the left Instances , and then select a region above.
      Select a region
    2. Find your RDS instance and click its ID. In the left-side navigation pane, click Databases.
  2. Click Create Database.
  3. Configure the following parameters.
    Parameter Description
    Database Name Enter the name of the database. The name must be 2 to 64 characters in length. It can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter and end with a letter or a digit.
    Supported Character Set Select the character set that is supported by the database. You can also select all and then select a character set from the drop-down list that appears.
    Authorized Account Select the authorized account of the database.

    If no accounts are created, you can leave this parameter empty.

    Account Type Specify the type of the authorized account. This parameter appears only after you select an authorized account. You can set this parameter to Read/Write, Read-only, or Owner.
    Description Enter a description that helps identify the database. The description can be up to 256 characters in length.
  4. Click Create.

References

Migrate data from an on-premises database to ApsaraDB RDS SQL Server 2008 R2 using full backup files

Related operations

API Description
Create account Creates an account for an ApsaraDB RDS instance.
Create database Creates a database for an ApsaraDB RDS instance.