How do i find my sql password

Morten Løgager 0 Reputation points
2023-06-16T10:14:12.7166667+00:00

My SQL installation on my local machine is running, but I am not able to log in to SQL

(error - was not intending to post this, it was a simple test, sorry out there ;-))

Windows for business | Windows Client for IT Pros | Devices and deployment | Configure application groups
SQL Server | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ronen Ariely 15,206 Reputation points
    2023-06-16T22:18:25.08+00:00

    Hello Morten and welcome to the QnA forum

    How do i find my sql password

    I assume according to the tag which you use that you mean "How do i find my sqlserver LOGIN password"

    The short answer is that you cannot.

    The password is not stored in any place in the server as a simple text. In fact it is not even stored as simple encryption value as well, but using a one-way hashing algorithms.

    A hash function is a many-to-one function, which in very simple words means that for the same input you get the same output, but you cannot get the input from the output, since a single output can be related to multiple inputs. Moreover, the value is encrypted using an algorithm which is not publicly documented.

    I am not able to log in to SQL

    It is always HIGHLY recommended to provide the full exact error message which you get in addition to a screenshot. You provided none of these, so we are playing a guessing game now.

    Assuming the issue is that you lost your SQL Server sysadmin password and you have the operating system administrator password, then you can restore your SQL Server password.

    It is recommended NOT to do it without the support of an expert and anything you do is on your own responsibility!

    For one tutorial on how to do it you can check this post:

    https://www.sqlshack.com/recover-lost-sa-password/

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.