In Amazon RDS, how can a disabled master user be re-enabled

amazon-rdssql-server-2008user-managementuser-permissions

With a SQL Server instance on Amazon RDS it is possible to do the following to your master user:

ALTER LOGIN masteruserid1 DISABLE
GO

If this command is executed while logged in as the that master user through SSMS, every other command will fail, as the account has now been disabled.

How can this be re-enabled?

Best Answer

You need to start SQL server in single user mode, same as if you locked out or disabled your SA account on a non-cloud SQL server.

(You use the -m startup switch, and a computer administrator can connect to SQL server as an SA and, for example, enable the SA account, create a new SA user, reset the SA password, etc.)

So, you'd stop all the SQL services, then run sqlservr -m from cmd and be able to connect using an account that's in the administrators group on the server.

Related Topic