The Mike Files

Laus Deo Semper

Posts Tagged ‘change password

SQL Server – Change ‘sa’ password

leave a comment »

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.

  1. Open command prompt
  2. 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.
  3. Hit Enter/Return Key

That’s it!

Written by themikefiles

September 19, 2009 at 12:12 pm

Follow

Get every new post delivered to your Inbox.