Windows/mssql

Aus SchnallIchNet
Wechseln zu: Navigation, Suche

Reset lost sa password

  1. Stop the service 'SQL Server (SQLEXPRESS)'
  2. Open properties of 'SQL Server (SQLEXPRESS)'
  3. Enter '-m' into the 'Start parameters' field.
  4. Start the service 'SQL Server (SQLEXPRESS)'
  5. open CMD
  6. Enter following command sequence:
osql -S PC_NAME\SQLEXPRESS -E

1> alter login sa enable
2> go
1> sp_password NULL,'new_password','sa'
2> go
1> quit
  1. Stop the service 'SQL Server (SQLEXPRESS)'
  2. Remove '-m' from the 'Start parameters' field.
  3. Start the service 'SQL Server (SQLEXPRESS)'