Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

An interesting situation here.

We have a database server, used for testing only, where someone went in and deleted the administrator login.

Since this is a test server the was no other admin level login on the server.

Is there a way to get access to the server again without reinstalling SQL Server?

We do not need the data in the databases, these are droped and recreated everytime the tests are run.

share|improve this question
add comment

3 Answers 3

up vote 3 down vote accepted

The simplest solution might well be to reinstall SQL Server. Don't forget that you need to consider the time (and hence money) it will take to look for and try alternate solutions which may or may not work.

Though the first thing I'd try is a "repair" installation, to see if it covers this eventuality.

share|improve this answer
    
Thanks, we ended up with a full reinstall, it is running now :) –  Shiraz Bhaiji Dec 20 '10 at 10:04
add comment

I realize this is a little bit old, but I found a workaround today that worked for me and thought it might be helpful to others.

If your NT Authority/System account has admin access, you can use the following trick to log in as the NT Authority/System account and create a new login/reset credentials on other logins.

Steps:

  1. Download PsExec: http://technet.microsoft.com/en-us/sysinternals/bb897553. This will allow you to run a program as the system user.
  2. Extract the Zip and copy everything to your executable path
  3. Open a command prompt and type the following: psexec /s /i "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe"

That should open up SQL Server Management Studio as the NT Authority/System login.

This also shows why it is probably a good idea to limit access to the NT Authority/System account unless you've got some other good reason.

share|improve this answer
    
You're a genius! Thank you so much! :) –  Diego Jancic Oct 31 '13 at 14:41
add comment

The best solution would have been to use the dedicated admin connection (DAC) which will let any administrator of the windows machine access the SQL instance. Unless you have absolutely no way to log in as the built-in windows administrator account or any account that is a member of the local Administrators group you would probably need to do a full reinstall of both Windows and SQL to gain access again unless the sa account (or some other SQL login that was assigned the sysadmin fixed role) was available. A SQL login doesn't help with your lack of administrator access to the Windows machine itself though... if that is what you meant anyway.

http://msdn.microsoft.com/en-us/library/ms189595.aspx

share|improve this answer
    
I don't know about MSSQL but restoring the Windows admin account most definitely does NOT require Windows to be reinstalled. –  John Gardeniers Dec 24 '10 at 1:21
    
Right, I am just assuming based on what they said that they some how locked themselves out from being able to access any administrator account on the machine and worst case scenario, they have bitlocker enabled so something like pogostick.net/~pnh/ntpasswd won't work. I believe deleting the actual built-in administrator account is not technically possible... but I'm not completely certain. –  tcnolan Dec 24 '10 at 3:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.