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

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
Jeenyusx10Asked:
Who is Participating?
 
pbarry1Connect With a Mentor Commented:
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
 
Ephraim WangoyaCommented:
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
 
Jeenyusx10Author Commented:
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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Jeenyusx10Author Commented:
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
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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
 
Jeenyusx10Author Commented:
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
 
Jeenyusx10Author Commented:
anyone, anyone?
0
 
Jeenyusx10Author Commented:
I knew it would be something like that!!!

About 15 minutes too late now.. I have already uninstalled!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.