Solved

Accidentally deleted windows admin account for SQL Server 2008. How to add myself back?

Posted on 2010-11-18
9
1,426 Views
Last Modified: 2012-05-10
I got to fooling around with stuff I shouldn't have been and deleted the Login ROB-PC..

Which you will probably recognize as the windows user account, which happens to be the only user account on this computer..

I can not connect to the server when I open SSMS..

I have never used mixed mode authentication.. if that matters.

Please help
0
Comment
Question by:Jeenyusx10
9 Comments
 
LVL 32

Expert Comment

by:ewangoya
ID: 34170396
Try using SQL Server Authentication using sa, that is if you have the password

Or got to sql server configuration manager
right click on the sql server in question, go to the logon tab and try resetting your logon from there
0
 

Author Comment

by:Jeenyusx10
ID: 34170494
I dont have the password for SA.. I've never used mixed mode.. always windows authentication.. I don't do anything serious just learning at this point.

Tried the second tip. No go on that as well..
0
 

Author Comment

by:Jeenyusx10
ID: 34170573
I am thinking that in order to fix this, I need to disguise myself and log in as some other entity that SQL Server knows about - If that makes sense.. I just have no clue how to do this.

When in SSMS right before I did this, I clicked on Logins and there were a few in there.. one of which was the windows user, the one I deleted. But there has got to be a way to get in. SA not being an option, I don't know what the username or password is.
0
 
LVL 13

Expert Comment

by:NarendraG
ID: 34170596
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 34170620
I have to agree, the only chance is a "sa" login, aka some login that has sysadmin fixed server role attached.

as you are learning, this will eventually result in you to have to reinstall sql server, but then simply reattach the databases (from the .mdf/.ldf files) which are not deleted by the uninstall
0
 

Author Comment

by:Jeenyusx10
ID: 34170651
Ok I will try the link you gave me, and if that does not work, I will learn my lesson the hard way.

The first task on that link is to log in @OS level. I am not sure what this means though.

Everything else makes sense.
0
 

Author Comment

by:Jeenyusx10
ID: 34179989
anyone, anyone?
0
 
LVL 4

Accepted Solution

by:
pbarry1 earned 500 total points
ID: 34180233
Hi,

if you haven't deleted the NT AUTHORITY\SYSTEM login in SQL Server, you should be able to add yourself back in SQL Server by creating a Windows scheduled tasks that runs under the local system account and by using the SQL command-line tool (osql.exe) to issue the CREATE LOGIN statement.
0
 

Author Comment

by:Jeenyusx10
ID: 34180236
I knew it would be something like that!!!

About 15 minutes too late now.. I have already uninstalled!
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Suggested Solutions

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to shrink a transaction log file down to a reasonable size.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now