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

Prerequisites

The RDS instance runs SQL Server 2008 R2.

Note For more information about how to create accounts and databases for RDS instances that run other SQL Server versions, see the following topics:

Creates an account

Precautions

  • Databases on the same RDS instance share all of the resources that belong to the RDS instance. You can manage standard accounts and databases by using SQL statements.
  • You must follow the minimal privilege principle to create accounts and grant read-only or read/write permissions to the accounts based on the required roles. If necessary, you can create more than one account and grant each account only the permissions to access the data within its authorized workloads. If an account does not need to write data to a database, you must 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. Log on to the ApsaraDB for RDS console.
  2. In the left-side navigation pane, click Instances. In the top navigation bar, select the region where your RDS instance resides.
    Select a region
  3. Find your RDS instance and click its ID.
  4. In the left-side navigation pane, click Accounts.
  5. Click Create Account.
    Create Account
  6. Configure the following parameters.
    Parameter Description
    Database Account:
    • The username of the account must be 2 to 16 characters in length. It 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 digit.
    • The username of the account cannot be the same as the username of an existing account.
    Account Type:
    • If the RDS instance uses local SSDs, select Privileged Account.
    • If the RDS instance uses standard or enhanced SSDs, select 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.
    • Special characters include ! @ # $ % ^ & * ( ) _ + - =
    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.
  7. Click OK.

Create a database

  1. Log on to the ApsaraDB for RDS console.
  2. In the left-side navigation pane, click Instances. In the top navigation bar, select the region where your RDS instance resides.
    Select a region
  3. Find your RDS instance and click its ID.
  4. In the left-side navigation pane, click Databases.
  5. Click Create Database.
  6. 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 lowercase letters, digits, underscores (_), and hyphens (-). It must start with a lowercase letter and end with a lowercase letter or digit.
    Supported Character Sets: 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 specified 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.
  7. Click Create.

References

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

Related operations

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