By modifying the registry key value, you can change the authentication method to SQL Server and Windows mixed authentication, as shown below:
1, click "Start"-"Run" to enter regedit, and press enter to enter the registry editor;
2. Expand the registry key in turn and browse to the following registry key:
[HKEY _ Local _ Machine Software Microsoft MSSQLServerMSSQLServer]
3. Find the name "LoginMode" on the right side 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. Close the Registry Editor;
6. Restart the SQL Server service.
At this point, users can successfully create a new SQL Server registration in Enterprise Manager using sa, but they still cannot connect to SQL Server using Windows authentication mode. This is because there are two default login accounts in SQL Server: BUILTIN>Administrators and < machinename > administrators have been deleted. To restore these two accounts, you can use the following methods:
1. Open Enterprise Manager, expand server groups, and then expand servers.
Expand Security, right-click Login, and then click New Login.
3, in the "name" box, enter the BUILTINAdministrators;;
4. In the "Server Roles" tab, select "System Administrator";
5, click "OK" to exit;
6. add > administrator login in the same way.
The following registry key
HKEY _ Local _ Machine Software Microsoft MSSQL server MSSQL server Login Mode
The value of determines the authentication mode that SQL Server will adopt. A value of 1 indicates that Windows authentication mode is used; The value is 2, which means mixed mode (Windows authentication and SQL Server authentication) is used.
After seeing how to solve the first two errors, let's look at the third error as shown in Figure 3.
If you encounter the third error, it generally means that the client has found this server and can connect, but the connection time is longer than the allowed time, which leads to the error. This usually happens when a user runs Enterprise Manager on the Internet to register another server that is also on the Internet, and the connection speed is slow, which may lead to the above timeout error. In some cases, this kind of error can also be caused by network problems in the local area network.
To solve this error, you can modify the connection timeout setting of the client. By default, the timeout setting for registering another SQL Server through the enterprise manager is 4 seconds, while the query analyzer is 15 seconds (which is why the enterprise manager is more likely to make mistakes). The specific steps are as follows:
1, in the Enterprise Manager, select Tools on the menu, and then select Options;
2. In the pop-up SQL Server Enterprise Manager Properties window, click the Advanced tab;
3. Under Connection Settings, enter a large number, such as 20, in the box to the right of Login Timeout (seconds).
You can also set it in the same location in the query analyzer.