This topic is applicable only to RDS for SQL Server 2012 and 2016 instances. For more information on how to create databases and accounts for other versions, see Create databases and accounts for an RDS for SQL Server 2017 instance and Create database and account for SQL Server 2008 R2.

Create an account

You can create a superuser account and standard accounts through the console. The superuser account can be created only through the console.

Precautions

  • When assigning permissions to database accounts, follow the principle of least privilege and create accounts based on the roles required. Assign the appropriate level of permissions to the accounts. When necessary, you can create multiple database accounts and allow each of them to access data relevant to their own business tasks. If an account does not need to write data to a database, assign read-only permissions to the account.
  • For database security, you must set strong account passwords and change the passwords regularly.

Procedure

  1. Log on to the RDS console.
  2. In the upper-left corner, select the region where the target instance is located.
    选择地域
  3. Find the target instance and click its ID.
  4. In the left-side navigation pane, click Accounts.
  5. Click Create Account.
  6. Enter the account information and click OK.
    Parameter Description
    Database Account The account name contains 2 to 16 characters, including lowercase letters, digits, and underscores (_). It must begin with a letter and end with a letter or digit.
    Account Type
    • Superuser Account: This option is available only when you create an account for the first time. You can create standard accounts only after you create a superuser account. Each instance has only one superuser account and this superuser account cannot be deleted.
    • Standard Account: This option is available only after you create a superuser account. One instance can have multiple standard accounts. You must assign database permissions to standard accounts manually.
    Password

    The password contains 8 to 32 characters, including at least three of the following types of characters: uppercase letters, lowercase letters, digits, and special characters. The allowed special characters are as follows:

    ! @ # $ % ^ & * ( ) _ + - =

    Re-enter password Enter the password again.

Create a database

  1. Log on to the RDS console.
  2. In the upper-left corner, select the region where the target instance is located.
    选择地域
  3. Find the target instance and click its ID.
  4. In the left-side navigation pane, click Databases.
  5. Click Create Database.
  6. Set the following parameters and click OK.
    Parameter Description
    Database Name The database name contains 2 to 64 characters including lowercase letters, digits, underscores (_), and hyphens (-). It must begin with a letter and end with a letter or digit.
    Supported Character Set Select a character set. If the character set you need is not listed, click All and select it from the drop-down list.
    Authorized Account Select the account to which you want to assign permissions. After you select an account, the Account Type parameter is displayed and you can set it to Read/Write, Read-only, or Owner.

    If no accounts have been created, you can leave the Authorized Account parameter blank.

    Remarks Optional. Enter the other account information that helps to better manage the account. You can enter up to 256 characters.

APIs

API Description
CreateAccount Used to create an account.
CreateDatabase Used to create a database.