All Products
Search
Document Center

ApsaraDB RDS:Manage logins

Last Updated:Mar 28, 2026

Logins are server-level security principals that authenticate connections to an ApsaraDB RDS for SQL Server instance. Each login is automatically granted server-level and database-level permissions when created. This topic covers how to create, modify, and delete logins using T-SQL statements.

ApsaraDB RDS for SQL Server is a managed service. You can only modify or delete logins that you created. Attempting to operate on logins created by other users returns an error.

Prerequisites

Before you begin, ensure that you have:

  • An ApsaraDB RDS for SQL Server instance running SQL Server 2012 or later

Create a login

Run the following statement to create a login:

CREATE LOGIN Test11 WITH PASSWORD=N'4C9ED138-C8F5-4185-9E7A-8325465CA9B7'

A confirmation message appears on the Messages tab.

Modify a login

Run the following statement to modify a login:

ALTER LOGIN Test11 WITH PASSWORD=N'123',CHECK_POLICY=OFF

If you attempt to modify a login that you did not create, the following error message is displayed:

Delete a login

Run the following statement to delete a login:

DROP LOGIN Test11
Note

You can only delete logins that you created. Attempting to delete a login created by another user returns an error.