Solved

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

Posted on 2010-11-18
9
1,455 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
Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

 
LVL 13

Expert Comment

by:NarendraG
ID: 34170596
0
 
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 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

749 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