locked
Sql Server forget password RRS feed

  • Question

  • Hi 

    what i do when i forgot the sql server password for authentication.

    and my all database in sql server authentication mode.

    Thank you.


    As Kushwaha

    Sunday, March 10, 2013 1:57 PM

Answers

All replies

  • A local administrator can always get access.  See:

    Batch File to Grant Local Administrators a Sysadmin Login in SQL Server

    David



    David http://blogs.msdn.com/b/dbrowne/

    Sunday, March 10, 2013 2:33 PM
  • And the topic from the SQL Server documentation Troubleshooting: Connecting to SQL Server When System Administrators Are Locked Out

    Rick Byham, Microsoft, SQL Server Books Online, Implies no warranty

    Monday, March 11, 2013 4:07 PM
  • Log in as an administrator and reset the password.

    make sure you maintain in a secure location.

    Tuesday, March 12, 2013 1:06 AM
  • If you forgot SQL Server password then you can use our Advanced SQL Server Password Recovery Software which is inexpensive utility that provides you very effective ways to get back lost SQL Password.
    Thursday, March 28, 2013 10:59 AM
  • Hi,

    If you ever lost a SA password, you may have thought your only option is to reinstall SQL and re-attach to the DB’s. However, SQL server provides a much better disaster recovery method which preserves objects and data in the master DB. Members of the server’s Local Administrator’s group can access SQL server by starting it in single-user mode.

    1.

    Configure SQL Single-User Mode

    - Open SQL Server Configuration Manager 
    - Stop the SQL Server Instance you need to recover the SA password 
    - Open the properties on the SQL Server Instance and click on the Advanced tab 
    - Change the Startup parameter by adding -m; at the begging of the line and click OK 
    - Start the SQL Service Instance

    2.

    Use SQLCMD to add a Sysadmin Account

    - Open the command prompt 
    - Run sqlcmd and press enter 
    - Run a Transact-SQL (Below) command to add an existing account or a new account to the sysadmin server role. Replace DOMAIN\Username with the account you want to add. *NOTE: if you receive errors, I’ve listed some common issues at the end of this article.

    EXEC sp_addsrvrolemember 'DOMAIN\Username', 'sysadmin'; 
    GO

    3.

    Un-configer SQL Single-User Mode

    - Open SQL Server Configuration Manager 
    - Stop the SQL Server Instance 
    - Open the properties on the SQL Server Instance and click on the Advanced tab 
    - Change the Startup parameter by removing the -m; at the begging of the line and click OK 
    - Start the SQL Service Instance

    4.

    Reset sa Password

    - Open Microsoft SQL Server Management Studio and login with the account you added 
    - Under the DB, expand Security, then Logins 
    - Open the properties for the sa account, and reset the password


    Thanks & Regards LAKSHMI NARAYANA REDDY.L

    Friday, March 29, 2013 4:39 AM
  • LAKSHMI NARAYANA REDDY.L Very Good Job..

    As Kushwaha

    Friday, March 29, 2013 7:43 AM
  • Hi Kushwaha! Try to run the SQL Server Management Studio as the system account. It will allow to connect to your database with the "NT AUTHORITY\SYSTEM" account. Once connect, you can either change sa password or create a new login. Here are step-by-step guide: http://www.top-password.com/blog/how-to-reset-forgotten-sa-password-without-stopping-sql-server-instance/
    Monday, November 18, 2013 7:59 AM
  • Confirm this method. Many thank
    Monday, June 4, 2018 2:31 AM