2008年6月13日

[SQL Express]How to change LogonMode and sa password

  1. 1. Open Regedit.
  2. 2. Check if [HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\LoginMode] is set to 1(Windows Mode) or 2(Mix Mode)
  3. 3. Modify the registry key to 2.
  4. 4. Open command prompt, change to C:\Program Files\Microsoft SQL Server\90\Tools\Binn
  5. 5. Execute osql -S [ServerName]\[InstanceName] -E
  6. 6. Under OSQL prompt, type each of the following statement and press Enter.
    sp_password @old = null, @new = 'complexpwd', @loginame ='sa'


    go




  7. 7. Restart SQL Service




reference:http://support.microsoft.com/kb/322336


沒有留言:

Blog Archive

About Me