This topic describes how to use SQL statements to create and manage logins in ApsaraDB RDS SQL Server databases.
Prerequisites
The instance version must be ApsaraDB RDS 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 will be granted server-level and database-level permissions when created. The following message is displayed in 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 only modify 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 only delete the login that you created. Otherwise, an error message is displayed.