Solved

Recover SQL account

Posted on 2011-03-03
5
345 Views
Last Modified: 2012-06-27
Hi,

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)?

Thanks
Jorge Paulino
0
Comment
Question by:jpaulino
[X]
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
5 Comments
 
LVL 15

Accepted Solution

by:
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 (http://msdn.microsoft.com/en-us/library/ms188236.aspx)
- 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 (http://msdn.microsoft.com/en-us/library/ms165702.aspx) to add yourself to the sysadmin roles (sp_addsrvrolemember, etc.)
0
 
LVL 15

Expert Comment

by:derekkromm
ID: 35033166
0
 
LVL 4

Expert Comment

by:Amgad_Consulting_Co
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.
0
 
LVL 48

Author Comment

by:jpaulino
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!
0
 
LVL 48

Author Closing Comment

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

Thanks for your time!
0

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