This topic describes how to create a privileged account or a standard account 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
The first account that you create for your RDS instance must be a privileged account. You can create only one privileged account for each RDS instance. The privileged account cannot be deleted in the ApsaraDB RDS console or by calling an API operation.
We recommend that you do not use Terraform to create a privileged account. A privileged account cannot be deleted by using Terraform. If you create a privileged account by using Terraform, you cannot delete the account by using Terraform. As a result, you may fail to release or unsubscribe from the RDS instance.
Databases that are created on an RDS instance share all the resources that belong to the instance.
The account name and database name cannot contain forbidden keywords. For more information, see Forbidden keywords.
For security purposes, we recommend that you specify strong passwords for accounts and change the passwords on a regular basis. You can also configure password policies for accounts to manage the validity period of the passwords and improve the account security. For more information, see Configure account password policies.
We recommend that you follow the principle of least privilege (PoLP) and grant the read and write permissions to accounts based on your business requirements. You can create multiple accounts and grant each account only the permissions to access the data of specified databases. If an account does not need to write data to a database, we recommend that you grant only the read permissions on the database to the account.
Procedure
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.
In the left-side navigation pane of the page that appears, click Accounts.
On the page that appears, click Create Account and configure the following parameters.
Parameter
Description
Database Account
The name of the account. The name can be up to 50 characters in length and can contain lowercase letters, digits, and underscores (_). It must start with a lowercase letter and end with a lowercase letter or a digit.
Account Type
Privileged Account: If this is the first time you create an account on the RDS instance, you must create a privileged account. You can create only one privileged account for each RDS instance. You cannot delete a privileged account.
Standard Account: You can create multiple standard accounts for an RDS instance. You must manually grant the permissions on databases to each standard account.
NoteFor more information about the permissions of different types of accounts, see Account permissions in an ApsaraDB RDS for SQL Server instance.
This topic describes how to create a privileged account or a standard account for an RDS instance. For more information about how to create a system admin account, see Create a system admin account for an ApsaraDB RDS for SQL Server instance.
You can create only standard accounts for RDS instances that run SQL Server 2008 R2 and use local disks.
Authorize Database:
You can grant different permissions on one or more databases to a Standard Account. If no databases are created, you can leave this parameter empty. After you create databases, you can grant permissions on your databases to a standard account. To grant permissions on a database to an account, perform the following steps:
In the Unauthorized Databases section, select the databases on which you want to grant permissions to the account.
Click the icon to add the selected databases to the Authorized Databases: section.
Grant the Read/Write (DML), Read-only, or Owner permissions on the databases to the account.
NoteThe account is authorized to create tables, delete tables, and modify schemas in a database only when it has the Owner permissions on the database.
New Password
The password of the account. The password must meet the following requirements:
It must be 8 to 32 characters in length.
It contains at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters.
It can contain the following special characters: ! @ # $ % ^ & * ( ) _ + - =
Confirm Password
The password of the account.
Apply password policy
Species whether to apply the password policy that you configure. The setting helps manage the validity period of the account password and improve the account security. Before you apply a password policy, you must configure a password policy for your account. For more information, see Configure account password policies.
Description
The description of the account. The description can be up to 256 characters in length.
Click OK.
You can refresh the page to view the created account. You can also modify the account permissions or manage the account based on your business requirements. For more information, see Modify the permissions of an account, Reset the password of an account, or Delete a standard account.
References
For more information about how to call an API operation to create a privileged account, a standard account, or other accounts with the required permissions, see CreateAccount.
For more information about how to create a system admin account in the ApsaraDB RDS console, see Create a system admin account.
FAQ
Can I manage the accounts that are created on the primary RDS instance on read-only RDS instances?
No, you cannot manage the accounts on the read-only RDS instances. The accounts that are created on your primary RDS instance are synchronized to the read-only RDS instances and have only read permissions on the read-only RDS instances.