locked
How to find User Login Password in SQL Server? RRS feed

  • Question

  • Hi All,

    Earlier one of my team member has created a user login and password but forgot the password after few days and now we need to know the password of that login.  Some of the application are using this login so we can delete and create a new login with the same name hence is there any possibility or script to find out the password of the existing login.

    Note: The login is not 'sa'

    Please let us know if any additional information is required.

    Really grateful to your interest, time & suggestions on this.

    Regards,

    Kalyan


    ----Learners Curiosity Never Ends----

    Monday, February 25, 2013 12:22 PM

Answers

  • IF its a sql login and you have access to the application servers, you could look for it in connection strings on those.


    Monday, February 25, 2013 1:01 PM

All replies

  • There is no way to find the password.  Your only option is to reset the password.


    David Dye My Blog

    Monday, February 25, 2013 12:52 PM
  • But I believe it is not possible if we don't know the password.

    Regards,

    Kalyan


    ----Learners Curiosity Never Ends----

    Monday, February 25, 2013 12:54 PM
  • IF its a sql login and you have access to the application servers, you could look for it in connection strings on those.


    Monday, February 25, 2013 1:01 PM
  • Hello Kalyan,

      The only way i could see is drop and recreate the login with a new password as you have your sa login with you.


    Best Regards Sorna

    Monday, February 25, 2013 1:04 PM
  • A sysadmin )a login which has sysadmin permission) can rest the password.


    This posting is provided “AS IS” with no warranties, and confers no rights.

    If this reply answers your question, please mark it as Answered for others to find it easily.
    If this reply help you resolving the problem, please vote the post as Helpful.

    Monday, February 25, 2013 1:28 PM
  • But I believe it is not possible if we don't know the password.

    Regards,

    Kalyan


    ----Learners Curiosity Never Ends----

    You can login as 'sa' or another system/security administrator account and change the password for login, you do not need to know old password:

    you can change password using below T-SQL:

    ALTER LOGIN [LoginName] WITH PASSWORD=N'NewStrongPassword'
    GO

    This will break you existing application as they won't be able to connect to database after you reset the password. You will need to reconfigure the applications to use the new password.

    Or as suggested by DBArrr - check the connection strings or any configuration files available in existing applications to retrieve the password.


    - Vishal

    SqlAndMe.com

    Monday, February 25, 2013 1:29 PM
  • Hi Kalyan, 

    All of the above answers are correct. If you are using (i hope not) SQL2000 it's possible to retrieve your password, however it requires you to snif your network traffic :).

    So your options are;

    1) Search your config file and look for the connection string

    2) Reset the password

    Thanks, 

    Teun

    Friday, January 17, 2014 12:09 PM
  • Best Answer>>>>

    http://v-consult.be/2011/05/26/recover-sa-password-microsoft-sql-server-2008-r2/

    Thanks

    Friday, August 29, 2014 5:11 PM
  • thanks @Ranjan Singhh your link is very helpful :)
    Sunday, November 16, 2014 8:07 PM
  • https://www.youtube.com/watch?v=D8k4eQhKlBw - I have not tried this, but the poster seems competent. This seems to show you a way to change your <g class="gr_ gr_107 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="107" id="107">sa</g> password without having to do anything else.
    • Edited by DKB_DC Friday, November 17, 2017 3:14 PM Clarification
    Friday, November 17, 2017 3:13 PM