All Products
Search
Document Center

ApsaraDB RDS:Manage logins

Last Updated:Mar 25, 2024

This topic describes how to use SQL statements to create and manage logins on an ApsaraDB RDS for SQL Server instance.

Prerequisites

The RDS instance runs SQL Server 2012 or later.

Create a login

You can execute the following statement to create a login:

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

The login is granted server-level and database-level permissions when the login is created. The following message is displayed on the Messages tab.

Modify the login information

You can execute the following statement to modify the login information:

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

You can modify only the login that you created. Otherwise, the following error message is displayed:

Delete a login

You can execute the following statement to delete a login:

DROP LOGIN Test11
Note

You can delete only the login that you created. Otherwise, an error message is displayed.