Reset SQL Server 2012 sa password when sa password is lost or no sysadmin

  1. Stop SQL server via Service Manager.
  2. Start SQL server via command prompt (with Admin privilledge)
    1. net start MSSQL /c /m /T3608   OR
    2. net start /c /m /T3608
  3. Use SQLCMD
    1.  sqlcmd -S MSSQL
  4. Enter the below SQL
    1. ALTER LOGIN sa with password='password', check_policy=off;
    2. go
    3. ALTER LOGIN sa enable;
    4. go
    5.  shutdown with nowait;
    6. go
  5. Then start the SQL server again as normal (e.g. via Service Manager).
  6. Then you can access the DB using sa.

Comments

Popular Posts