November 6, 2008 at 7:11 am
I have a database. And I forget the password for user 'sa' and for the other user 'dbuser' which I created. Is there any way I can find out the password for either one of user.
Response would be appreciated.
November 6, 2008 at 7:26 am
I think you have a couple of options (feel free to correct me if any of these are not feasible):
* Log onto the local machine as a local administrator. Then you can try logging into SQL Server with Windows authentication.
* Take a backup of master and restore it under a different name to another server, you may be able to enter an entry for BUILTIN\Administrators in the sysxlogins table and then restore it back onto the original server.
* Stop SQL Server. Then you can copy the database files to another server and attach them there. Or reinstall SQL Server on the machine in question, and then attach the database files. Make sure that you don't lose the files for master, model and msdb in the reinstallation process.
* Assuming you have SQL Server 2005, you can stop the server and restart it in single user mode - then you can connect as a local administrator and reset the sa password.
November 6, 2008 at 7:31 am
Grumpy DBA (11/6/2008)
I think you have a couple of options (feel free to correct me if any of these are not feasible):* Log onto the local machine as a local administrator. Then you can try logging into SQL Server with Windows authentication.
* Take a backup of master and restore it under a different name to another server, you may be able to enter an entry for BUILTIN\Administrators in the sysxlogins table and then restore it back onto the original server.
* Stop SQL Server. Then you can copy the database files to another server and attach them there. Or reinstall SQL Server on the machine in question, and then attach the database files. Make sure that you don't lose the files for master, model and msdb in the reinstallation process.
I can do that. Is there any other way or any query through which I can find out the old Password?
November 6, 2008 at 10:20 am
You can't retrieve the password for a SQL Server login. Your only option is to reset it, as Grumpy DBA suggested.
Greg
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply