Setting or Changing a MSSQL Password

It is VERY important to set a strong password on the built-in MSSQL accounts (especially the 'sa' default account).

Using the OSQL command line tool with Windows authentication:
    Execute osql.exe -E -H localhost -Q "sp_password NULL,<new strong password>,sa"
 

Using the OSQL command line tool with SQL authentication (you will be prompted to enter the 'sa' password - it is usually blank unless you or an application previously set it to something):
    Execute osql.exe -U sa -H localhost -Q "sp_password NULL,<new strong password>,sa"
 

For assistance contact helpdesk@fnal.gov.
Information compiled and maintained by Computer Security Team ; last modified by TR on July 13, 2006.
(Address comments about page to the Computer Security Team.)