This topic describes how to create databases and accounts for an RDS instance in SQL Server 2008 R2 through the RDS console.

Note For more information on how to create databases and accounts in other SQL Server versions, see the following resources:

Prerequisites

The SQL Server version is 2008 R2.

Create an account

Precautions

  • To migrate data from an on-premises database to RDS, you must create databases and accounts that are the same as those of the on-premises database.
  • 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 purposes, set strong passwords for the accounts and change the passwords regularly.

Procedure

  1. Log on to the RDS console.
  2. Select the target region.选择地域
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, click Accounts.
  5. Click Create Account.Create Account
  6. Enter the account information.Create an account
    Parameter Description
    Database Account The account name must be 2 to 16 characters in length and can contain lowercase letters, numbers, and underscores (_). It must start with a letter and end with a letter or number.
    Authorized Databases Select the databases for which the account has permissions. If no databases have been created, you can leave this parameter blank.

    An account can be authorized with multiple databases. To authorize an account to databases, follow these steps:

    1. In the left area, select the target databases.
    2. Click Add to add the selected databases to the right area.
    3. Set the account's permission on each database, which can be Read/Write or Read-only. You can also click the button (for example, Full Control Read-only) in the upper-right corner to set the permissions for the databases in batches.Authorized Databases
    Password

    The account password must be 8 to 32 characters in length and contain at least three of the following types of characters: uppercase letters, lowercase letters, numbers, and special characters. The allowed special characters are as follows:

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

    Re-enter Password Enter the password again.
    Remarks Optional. Enter details about the account to better identify it. You can enter up to 256 characters.
  7. Click OK.

Create a database

You can create up to 300 databases for an RDS SQL Server 2008 R2 instance.

  1. Log on to the RDS console.
  2. Select the target region.
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, click Databases.
  5. Click Create Database. Create Database
  6. Enter the database information.Create a database
    Parameter Description
    Database Name The database name must be 2 to 64 characters in length and can contain lowercase letters, numbers, underscores (_), and hyphens (-). It must start with a letter and end with a letter or number.
    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.

    If no accounts have been created, you can leave this parameter blank.

    Account Type This parameter is displayed after you select an authorized account. You can set this parameter to Read/Write or Read-only.
    Remarks Optional. Enter details about the database to better identify it. You can enter up to 256 characters.
  7. Click OK.

Resources

Migrate full backup data to RDS for SQL Server 2008 R2

APIs

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