Delete a database account
Delete standard accounts, privileged accounts, and SA-privileged accounts from an ApsaraDB RDS for SQL Server instance using the ApsaraDB RDS console or the DeleteAccount API operation.
Deletion is permanent and cannot be undone. Before you delete an account, make sure the account is no longer used by any applications — existing application connections will fail immediately after deletion. Update your application credentials before proceeding.
Prerequisites
Before you begin, ensure that you have:
An ApsaraDB RDS for SQL Server instance
Access to the ApsaraDB RDS console with sufficient permissions to manage accounts
Account permission rules
Understanding how deletion affects permissions helps you avoid unexpected access issues.
Privileged account rules
Scenario | Behavior |
Create a privileged account | Automatically granted the db_owner role for all existing databases. No manual grant needed. |
Add a database | The account does not have access to databases created after the account was created. Modify the permission scope in the console to grant db_owner on the new database. |
Delete a privileged account | Permanently removes the account and all its database permissions. The account can no longer log on or perform any database operations. |
Recreate a privileged account | Regardless of username, the system automatically grants db_owner on all existing databases in the instance. For databases created afterward, modify permissions manually. |
Manually selecting the sysadmin server role for a privileged account in SQL Server Management Studio (SSMS) does not take effect. ApsaraDB RDS applies security restrictions to privileged accounts and does not allow you to directly grant the sysadmin permission. If you need the sysadmin permission, create a database account with SA permissions. After you create this type of account, the instance is no longer covered by the SLA.
Standard account rules
Scenario | Behavior |
Create a standard account | Manually specify authorized databases and permissions: Read/Write, Read-Only, or Owner. If no database is selected, the account has no access to any database. |
Add a database | No access to newly created databases by default, even if the account was previously granted permissions. Manually add the database to the account's authorization list and set permissions. |
Delete a standard account | All database access permissions are permanently removed. The account can no longer log on, and connections from attached applications will fail. Update the application credentials promptly. |
Recreate a standard account (same name) | Original permissions are not restored. The new account starts with no permissions. Re-authorize databases and set permissions manually. |
Global read-only account rules
Scenario | Behavior |
Create a global read-only account | When the account is created, it is automatically granted read-only permissions on all existing databases in the instance. No per-database grant is required. The account cannot access the |
Add a database | The account is automatically granted read-only access to databases created after the account. No manual grant or permission scope change is required. |
Delete a global read-only account | Deleting the account permanently removes the account and its read-only permissions. The account can no longer be used to log on or perform database operations. |
Re-create a global read-only account | Regardless of whether you use the original account name, the system automatically grants the account read-only permissions on all existing databases in the instance. The account is also automatically granted read-only permissions on databases created afterward, without manual grants. |
Delete an account
Go to the Instances page. In the top navigation bar, select the region where the instance resides. Find the instance and click its ID.
In the left-side navigation pane, click Accounts.
Find the account you want to delete and click Delete in the Actions column.
In the dialog box, click OK.
References
Delete a database account by calling the DeleteAccount API operation.
Use the command line to manage LOGIN users and manage USER users.