Posts Tagged ‘change password’
SQL Server – Change ‘sa’ password
Many of us forget things, especially if we do things very lightly and not doing it as usual. Remembering passwords is one of these. Now if so happens if you forget your ’sa’ password for the MS SQL then we can do the following:
Note: You should be a member of Administrators Group/Administrator for Windows to change this. I usually make these changes on the SQL Server itself. You can check it further in Microsoft SQL Server’s documentation for details. My example here is using the “sqlcmd.exe” though this will work with osql.exe too.
- Open command prompt
- Type the following on the command prompt: C:\> sqlcmd -E-Q “EXEC sp_password NULL, ‘newpassword’,’sa’” Note: The ‘newpassword’ is the password of your choice.
- Hit Enter/Return Key
That’s it!