SA password issue

  • Hi Guys,

    Is there a way to recover or change the sa password in SQL server 2005.

    Please make a note that SQL server Management studio is not installed on SQL server and no one

    able to recollect sa password.

    Regards,

    Vishal

  • is there not a different machine that has ssms is installed on where you can connect into the sql server from there

  • As long as you can connect with another login with sysadmin permissions you can use the ALTER LOGIN statement to change the password. If you don't have SSMS you can use sqlcmd or Query Analyzer from a SQL 2000 instance.

    [font="Verdana"]Markus Bohse[/font]

  • As previously indicated, if you have any logins which are a member of the sysadmin fixed server role, those logins can reset the password either by using sp_password or ALTER LOGIN. Just don't use the parameter which specifies the old password. BUILTIN\Administrators is a member of that role by default, so if this hasn't been changed, anyone who is a local administrator over the server can login and reset the sa password.

    If no one has those rights (and you've basically locked yourself out of your SQL Server), there's a back door to get in and that's by restarting SQL Server in single user mode. When it's restarted in that mode, any of the local administrators group can connect and SQL Server will treat them as having sysadmin rights. More about how to do that here:

    Disaster Recovery: What to do when the SA account password is lost in SQL Server 2005

    K. Brian Kelley
    @kbriankelley

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply