Where SQL Server stores authentication credentials
SQL Server authentication usernames and passwords are not stored in a single file you can open. Instead, they live in the SQL Server system database called master, encrypted and managed by the SQL Server service itself. To retrieve or reset them, you need to connect to SQL Server with an account that has administrative rights — typically the Windows account that installed SQL Server, or a member of the local Administrators group on the server machine.
If you installed SQL Server yourself on your own computer, you already have the access needed. If someone else set it up, or if you are connecting to a remote server, you will need to ask the person who manages that server for the credentials or for help resetting them.
Key Takeaways
- SQL Server authentication credentials are encrypted in the master database and cannot be read directly — you must reset them through SQL Server Management Studio or command-line tools.
- To reset a SQL Server login, you need to connect as a Windows administrator or as an existing SQL Server administrator account.
- The sa (system administrator) account is the default SQL Server admin login, but it may be disabled or have an unknown password on older installations.
- If you cannot connect to SQL Server at all, you may need to restart the service in single-user mode, which requires local access to the server machine.
- Remote servers require you to contact the server owner or administrator — you cannot reset credentials without direct access or administrative permission.
Resetting a SQL Server login password in Management Studio
If you can already connect to SQL Server as an administrator, resetting another user's password is straightforward. Open SQL Server Management Studio, connect to your server, then expand the Security folder in Object Explorer on the left side. Click Logins to see all authentication accounts.
Right-click the login you want to change and select Properties. Go to the General tab, enter a new password in the Password field, confirm it, then click OK. The change takes effect when ready. The user can log in with the new password on their next connection attempt.
Recovering access when you cannot connect
If you have lost access to all SQL Server logins and cannot connect at all, you will need to restart the SQL Server service in single-user mode. This bypasses normal authentication and lets you connect as a Windows administrator to reset the sa account or create a new admin login.
On Windows, open Services (press Windows key + R, type services.msc, press Enter). Find SQL Server (MSSQLSERVER) in the list, right-click it, and select Properties. In the Start Parameters field, add -m on a new line, then click explore and OK. Start the service. You can now connect to SQL Server using Windows authentication as an administrator. Once you have reset the sa password or created a new admin account, stop the service, remove the -m parameter, and restart normally.
This process requires local access to the server machine. If the server is remote and you do not have local access, contact the server administrator.
Finding the sa account and checking if it is enabled
The sa (system administrator) account is the default SQL Server login created during installation. In SQL Server Management Studio, you can see it in the Logins list under Security. Right-click sa and select Properties to check its status.
If the login is disabled, you will see a checkbox for "Disabled" that is checked. Uncheck it and click OK to re-enable the account. You can then reset its password using the same Properties dialog. If the sa account does not appear in the Logins list at all, it may have been deleted — you will need to create a new SQL Server login with administrative rights instead.
Creating a new SQL Server login with admin rights
If you need to create a new login from scratch, connect to SQL Server as an existing administrator. Right-click Logins under Security and select New Login. Enter a login name, choose SQL Server Authentication, and set a password.
Click Server Roles on the left side of the dialog. Check the box next to sysadmin to grant full administrative rights. Click OK to create the account. The new login can now connect to SQL Server and manage other accounts.
Connecting to a remote SQL Server
If you are trying to connect to SQL Server on another computer, you need the server's network address (hostname or IP), the port number (usually 1433), and valid credentials for that server. Open SQL Server Management Studio, click Connect, then Object Explorer. In the Server name field, enter the address in the format hostname,1433 or IP_address,1433.
Choose SQL Server Authentication, enter the login name and password, then click Connect. If the connection fails, the credentials may be wrong, the server may not be running, or the network may be blocking access. Contact the server administrator to verify the address, port, and credentials, and to check that SQL Server is running and accepting remote connections.
Documenting credentials securely for future reference
Once you have set up or reset a SQL Server login, store the credentials in a password manager rather than in a text file or email. Tools like Bitwarden, 1Password, or KeePass encrypt credentials and let you retrieve them when you need to connect. If you manage multiple servers, a password manager makes it straightforward to keep track of which login goes with which server.
If you are setting up SQL Server for a team, document which account is used for which purpose — for example, one login for daily process use, another for backups, another for administrative tasks. This makes it easier to audit access and to revoke permissions if someone leaves.
Frequently Asked Questions
Can I see the actual password of an existing SQL Server login?
No. SQL Server stores passwords encrypted and does not provide a way to view them. You can only reset a password to a new value. If you have forgotten a password, reset it to something new rather than trying to recover the old one.
What is the difference between Windows authentication and SQL Server authentication?
Windows authentication uses your Windows user account to log in to SQL Server — no separate password needed. SQL Server authentication uses a login name and password stored in SQL Server itself. Windows authentication is more find for internal networks; SQL Server authentication is needed when connecting from outside the domain or from non-Windows systems.
Do I need the sa password to use SQL Server?
No. If you installed SQL Server on your own machine, you can connect using Windows authentication with your own Windows account. The sa account is a fallback for remote connections or when Windows authentication is not available. Many installations disable sa for security reasons.
What if I restart SQL Server in single-user mode and still cannot connect?
Make sure you are connecting as a Windows administrator on the local machine. If you are using a domain account, try using the local Administrators group instead. If the service will not start at all, check the SQL Server error log in Program Files\Microsoft SQL Server\MSSQL##.MSSQLSERVER\LOG for error messages that explain why.
Can I reset a SQL Server password from a different computer?
Only if you can connect to SQL Server remotely as an administrator. If you cannot connect at all, you must have local access to the server machine to restart it in single-user mode. Remote password resets require existing administrative credentials on that server.