net start mssql$sql2008r2 /m"SQLCMD"
sqlcmd -S.sql2008r2 -d master
alter login sa enable
go
alter login sa with password ='1234' UNLOCK
go
exit
The Authentication mode for MS-SQL Server can be changed after installation without installing the SQL Management Studio.
- Open the Window Registry Editor (Start --> Run --> regedit.exe).
- Go to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<INSTANCE NAME>\MSSQLServer where <INSTANCE NAME? is the name of the MS-SQL instance.
- Locate the field "LoginMode". Change it's value to "2" to put MS-SQL into Mixed Mode Authentication.
- Restart the MS-SQL service.