Recover SQL account

Posted on 2011-03-03
Last Modified: 2012-06-27

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
Question by:jpaulino
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 15

Accepted Solution

derekkromm earned 500 total points
ID: 35033164
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.)
LVL 15

Expert Comment

ID: 35033166

Expert Comment

ID: 35036980
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.
LVL 48

Author Comment

ID: 35044508
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!
LVL 48

Author Closing Comment

ID: 35074741
I have installed SQL Server 2008 R2 and it's working.

Thanks for your time!

Featured Post

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question