I have a problem, I’m using windows 7 with MS SQL Server Management Studio Express 2005 although I’ve lost my administrator/ sa password. Is there a command I can use to reset the password, without the old one?
I can login using windows authenication.
many thanks,
James
Login to the SQL Server computer as the Administrator of that computer. Open Query Analyzer and connect to SQL Server using Windows NT authentication. Run sp_password as shown below to reset the sa password:
EDIT:
This is unexpected, as you were able to get in to detach a db, so you must
have some privileges. The message you got:
… is a response to the
sp_passwordcommand. So when you say you tried toreconnect with ‘sa’, can you tell us how you did that?
Also, when using the SQLCMD tool, you have to type GO to execute a command:
Then you need to exit before you try to reconnect.
Try getting in again, and seeing who you are. So after connecting:
Please run this:
Also, run this after you obtain your user name and enter your new password per my original answer: