Updated on 2023-07-06 GMT+08:00

Creating an Account

Scenarios

You can use a stored procedure to create a login account. This account has all permissions of the rdsuser user on Microsoft SQL Server databases.

  • The stored procedure can be executed only by the rdsuser user or the created account.
  • The password must consist of 8 to 32 characters and contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters (~!@#$%^*-_=+?,).

Prerequisites

An RDS Microsoft SQL Server DB instance has been connected.

Procedure

Run the following command to create an account. After the command is executed successfully, you can use the created account to log in.

EXEC master.dbo.rds_create_major_login @login='loginName', @password='password' ;

  • loginName: login name of the created account.
  • password: password of the created account.

Example

Run the following command to create an account whose name is rdsuser1 and password is ******:

EXEC master.dbo.rds_create_major_login @login='rdsuser1', @password='******';

After the account is created successfully, information similar to the following is displayed:

HW_RDS_Process_Successful