Recover SQL account


I have changed (wrongly) a few permissions in the SQL Server Express account. Now I have "sa" account disable, the windows authentication without any permission to change things.

It's all in my local machine, where I have Visual Studio 2008 and 2010, but now I cannot do anything :(

Can I do something or do I need to install everything? If I need to install what I really need to reinstall (since it was installed with Visual Studio)?

Jorge Paulino
LVL 48
Jorge PaulinoIT Pro/DeveloperAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

derekkrommConnect With a Mentor Commented:
There's a workaround. If you're an administrator, you can do the following:

- start sql server in single-user mode (
- in single-user mode, windows administrators are (should be...) given access to the database, regardless of how authentication is setup
- now, you can use the sqlcmd utility ( to add yourself to the sysadmin roles (sp_addsrvrolemember, etc.)
Can't you just re-enable the SA user, if you login with the machine administrator, I think you will be able to do this.
Jorge PaulinoIT Pro/DeveloperAuthor Commented:
Well, the problem is that I'm not the administrator (I remove that from my account before I disable the sa user). That way I cannot do that.

I'm reinstalling again the SQL Server ... I hope it works after that!
Jorge PaulinoIT Pro/DeveloperAuthor Commented:
I have installed SQL Server 2008 R2 and it's working.

Thanks for your time!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.