You can create common users in the user database that you created, but not in the system database. This document describes how to create and manage users in a database of ApsaraDB for SQL Server by using SQL commands.

Note
The operation described in this document is applicable only to instances of RDS SQL Server 2012 and later versions.

Prerequisites

Create a user

Run the following command to create a user in the database named TestDB:

USE TestDB
Go
CREATE USER [Test] FOR LOGIN [Test]

Modify user information

Modify user information in accordance with the corresponding operation instructions of SQL Server. For example, you can run the following command to modify user-mapped logon information:

USE TestDB
GO
ALTER USER test WITH LOGIN=test

Delete a user

Run the following command to delete a user (the operation is the same as that on SQL Server):

USE TestDB
GO
DROP USER test