January 3, 2012 at 11:33 am
I was able to log in this morning as <Domain>\Administrator to my 2005 SQL Express server with Management Studio. I made a backup of a database then renamed an existing database.
I tried to continue working on another database and suddenly the <Domain>\Administrator role/account is no longer on the server. I cannot access the server now.
Any idea wha may have caused this Admin account to go away? I can still remote into the server with the Admin account but cannot access the SQL server. I have tried restarting the service several times.
Is there a way to restore this account?
The person that configured and set up the SQL server is no longer with the company and so we do not have the sa password. I have other "User" level accounts that I can log in with, but they have limited access to specifc databases.
January 3, 2012 at 12:03 pm
That's a nice present, isnt' it :sick:
have a look at Troubleshooting: Connecting to SQL Server When System Administrators Are Locked Out
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
January 3, 2012 at 12:08 pm
justin.jones 10898 (1/3/2012)
Any idea wha may have caused this Admin account to go away?
Someone or some app ran a script to remove it. SQL's not in the habit of randomly dropping logins
Is there a way to restore this account?
Log into windows as a member of the local administrators group. Start SQL in single user mode, then when you connect to the DB (I recommend SQLCMD) you'll be considered a sysadmin and you can add new logins or change the sa password.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 3, 2012 at 12:18 pm
What is the error message you are getting when you try to connect with that id? If default database is set as that database then when logging in with default parameter will fail, you need to change the database context.
Regards..Vidhya Sagar
SQL-Articles
January 3, 2012 at 12:28 pm
For the login, the default database was the one that I changed the name of.
Now that I have done this dastardly deed, is there anyway i can Undo this? The role was for anyone in the "Administrators" group.
January 3, 2012 at 12:38 pm
Ah, in that case it's a hell of a lot simpler. The login's still there, it's just failing to open the default DB.
Open management studio. New query. The connection dialog comes up. Click the 'Options' button. In the drop down 'connect to database...' select or type 'master'
Connect. It will be successful because the explicitly selected DB is overriding the default.
Now fix the default database for that login. Any sysadmin login or group should have a default database of master to avoid exactly this kind of problem.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 3, 2012 at 12:46 pm
1,000,000,000 thanks! My blood pressure just dropped 500 points!
Thank you. That worked.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply