If you forget the password for a database account or a login fails due to an expired password on your ApsaraDB RDS for SQL Server instance, you can quickly reset the password in the ApsaraDB RDS console or by calling an API to ensure business continuity. To enhance data security, we recommend setting a password policy or rotating passwords regularly. This practice is crucial for reducing security risks in scenarios involving multi-user collaboration, permission changes, or security audits.
Limitations
You cannot change a password in the ApsaraDB RDS console if the login is configured with a client-side password policy. This occurs when, in SQL Server Management Studio, on the General page of the Login Properties dialog box, authentication is set to SQL Server authentication and the following options are selected: Enforce password policy, Enforce password expiration, and User must change password at next login. In this scenario, you must connect to the SQL Server instance and run the following SQL commands to change the password:
USE Master
GO
ALTER LOGIN UserName WITH PASSWORD = 'password'
GO
ALTER LOGIN UserName WITH
CHECK_POLICY = OFF,
CHECK_EXPIRATION = OFF;
Procedure
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
-
In the left-side navigation pane, click Accounts.
-
Find the account, and in the Actions column, click Reset Password.
-
In the dialog box that appears, enter and confirm the new password, and then click OK.
The password must meet the following requirements:
-
Be 8 to 32 characters long.
-
Contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
-
The allowed special characters are: !@#$%^&*()_+-=
-