Hi, so recently when trying to fix another bug within my sql server 2008 R2 db I removed the BUILTIN\Administrators login from sysadmin. Now it will not let me change anything winthin the database. Also I do not have the SA account password to log in as that user to change/ add any permission.

Can anyone help me add the BUILTIN\Administrators login back into sysadmin or find a way to alter the database using my windows account?

3 Answers 3


To assign sysadmin, you have to do it while logged in as a sysadmin. From here,

Requires membership in the role to which the new member is being added.

which is basic escalation prevention.

You'll need to do one of two things:

  1. Log in as a sysadmin (Windows account or otherwise), or have someone else do this if there are other sysadmin level logins on the server.

  2. Restart the instance in single-user mode (which allows local administrators to log in as sysadmin automatically), fix the login, then restart in multi-user mode.


Start the SQL Server service in single-user mode (by using the -m startup parameter). When you do this, all members of the local administrators group will have sysadmin rights. Provided you are a member of that group, you should be able to do whatever sysadmin actions you need.

Take a look at Database Engine Service Startup Options for documentation.

Edit: To start SQL Server in Single-User Mode, please see this documentation.

  • I do applologise but would you be able to run me through the steps for doing this task? Jul 23, 2012 at 15:24
  • 1) stop sql server. 2) start sql server from command line with the -m switch. 3) connect to sql server from an account with local admin privs. 4) make changes (add local admins). 5) stop sql. 6) start sql normally. here's a link from the one that @Shark has already provided
    – swasheck
    Jul 23, 2012 at 15:37
  • @swasheck Im sorry but i do not know how to start the sql server from a command line. Jul 23, 2012 at 15:39
  • @GlenRobson See my edit, that's a BOL reference to tell you how to do it. Like swasheck said, you just need to stop the service (also stop SQL Server Agent) and you can use the service switch to start it in single-user mode, or you can use the command line to start SQL Server. Either way is fine, but you'll need to ensure after you regain access and do what you need to that you revert back to multi-user mode (i.e. without the single-user switch). Jul 23, 2012 at 15:47

Stop all SQL services, then go into SQL Server Configuration Manager and select SQL Server Services in the tree. Then go into Properties for the database engine service of interest and select the Advanced tab. Click the dropdown arrow on the Startup Parameters value, and add ;-m (semicolon, dash, m) to the end of the text. Click OK to exit the dialog box. Restart the service for the SQL instance of interest.

If you have SQL Management Studio open, close it and then right click on the program and select run as administrator. Fix the Security options you need, save and then close the program. Go in SQL Server Configuration Manager and stop the SQL instance of interest and then go in and remove the ;-m from the Startup Parameters. Restart the SQL instance of interest and start SQL Management Studio(without running as administrator) as the user or user of the group you made changes for and ensure the changes you made worked. If so, restart all of the other services needed to bring the SQL server online.

Props to Jon Seigel and Glen Robson for this solution

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.