?
Solved

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

Posted on 2010-11-18
9
Medium Priority
?
1,490 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
[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
9 Comments
 
LVL 32

Expert Comment

by:Ephraim Wangoya
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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 143

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 2000 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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.
Suggested Courses

752 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