Solved

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

Posted on 2010-11-18
9
1,437 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 13

Expert Comment

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

Backup Your Microsoft Windows Server®

Backup 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.

Question has a verified solution.

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

Suggested Solutions

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
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

776 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