cannot connect to the Server to do
SQL Server cannot be connected to how to solve?Prompt "Unable to connect to the server, the user login failed XXX "For what reason?The cause of this error is due to the SQL Server
USES "Only Windows"Authentication way, so users can't use SQL Server login account (sa) to connect. Solution is as follows:
1 the use of corporate governance on the Server side, and select "Using Windows authentication "SQL Server connection.
2. A "SQL Server group "And the right mouse button click on the name of the SQL Server Server, select "Property ", and select "Security "TAB.
3. In "Authentication "Next, select "SQL Server and Windows ".
4. Restart the SQL Server service.
in the above solution, if used in step 1 "Using Windows authentication "Connection SQL Server failed, then by modifying the registry to solve the problem:
1. Click "Start "- "Run ", type regedit, and enter into the registry editor.
2. In turn, a registry entries, browse to the following registry keys:
[HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Microsoft \\ MSSQLServer \\ MSSQLServer]
3. Found in the screen to the right name "LoginMode", double click on the edit double byte value.
4. The original value from 1 to 2, click "Identify ".
5. Close the registry editor.
6. Restart the SQL Server service.
at this point, the user can successfully use sa in the corporate governance is a new SQL Server registration, but still can't use Windows authentication mode to connect to SQL Server.This is because in the SQL Server
there are two default login account BUILTIN \\ Administrators<The name of the machine >\\ Administrator to be deleted.
to restore the two account, you can use the following approach:
1. Open the corporate governance, a server group, and expand the server.
2. A "Security ", right click "Login ", and then click "New login ".
3. In "Name "Box, enter the BUILTIN \\ Administrators.
4. In "Server role "TAB, select "The System Administrators".
5. Click "Identify "To exit.
6. Use the same method to add & lt;The name of the machine >\\ Administrator login.
the following registry keys:
hkey_local_machine \\ SOFTWARE \\ Microsoft \\ MSSQLServer \\ MSSQLServer \\ LoginMode value determines the SQL Server will adopt what kind of the authentication model.
1. Said use "Windows authentication "Mode.
2. Said the use of mixed mode (Windows authentication and SQL Server authentication).