This article is half-done without your Comment! *** Please share your thoughts via Comment ***
To reset or recover SA Password of SQL Server is a very common thing because DBAs are managing different servers and their admin passwords, so there are always chance to forget or lost of SA – System Administrator Password.
One of our system admins configure development SQL Server, and later he forgot the password of SA Login and unfortunately he didn’t apply Windows authentication of that server. He called me and asked to reset or recover SA Login of SQL Server.
I suggested OSQL utility which allows you to enter Transact-SQL statements, system procedures, and script files. This utility uses ODBC to communicate with the server.
Another option is very simple, if you enabled Windows authentication, you can log in with Windows authentication and can reset the SA password using SSMS.
Let me share steps for both the options:
Using OSQL Command Prompt:
Open Command Prompt and type:
1 osql-LCopy SQL Server name and type:
1 OSQL -S Server_Name -EExecute a query to reset password of SA:
1 sp_password NULL,'new_password', 'sa'Type GO and execute it
Using SSMS – Windows Authentication:
- Connect to SQL Server instance via Windows Authentication
- Navigate to Logins object under the Security -> right-click on the SA user and choose Properties
- Enter the new password and confirm password field respectively and click OK
Leave a Reply