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

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

Prerequisites

Create a user

Run the following commands 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 commands to modify user-mapped logon information:

USE TestDB
GO
ALTER USER test WITH LOGIN=test

Delete a user

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

USE TestDB
GO
DROP USER test