-- Modify the registry.
1. Click "start"-"run", enter regedit, and press enter to enter the Registry Editor.
2. Expand the registry key in sequence and browse to the following registry key:
[HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ MSSQLServer]
3. Find the name "loginmode" on the right of the screen and double-click to edit the double-byte value.
4. Change the original value from 1 to 2 and click "OK"
5. Disable Registry Editor
6. Restart the SQL Server service.
Top
Zjcxc (zhujian) on the third floor replied to 08:23:16, score 0
Note:
The following registry key:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ MSSQLServer \ loginmode
The value determines the Authentication mode that SQL server will adopt.
1. indicates that the "Windows Authentication" mode is used.
2. indicates that the hybrid mode is used (Windows Authentication and SQL Server Authentication ).
Top
Zjcxc (zhujian) on the 4th floor replied with a score of 0 at 08:26:41
-- Or use osql
Osql/e/Q "Exec master .. xp_instance_regwrite n 'HKEY _ LOCAL_MACHINE ', n' SOFTWARE \ Microsoft \ MSSQLServer', 'loginmode', n' Reg _ dword', 2"
Top
Load (not something) on the fifth floor replied to 17:09:26 score 0
Use the installation parameter securitymode = SQL
For example, setup sapwd = "AAA" securitymode = SQL