Method: First log in to the client, find "Instance Name Protocol", enable "Named Pipes" and "TCP/IP"; then start "SQL Server"; finally open "SSMS" and select "Database Engine" , "local)\instance name" and "windows authentication", click "Connect".
The operating environment of this article: Windows 7 system, Dell G3 computer, SQL Server 2008.
sql server 2008 cannot connect to the local server because there is a problem with the protocol inside. The specific solution is as follows:
Open the SQL server configuration manager-->SQL server network configuration- ->The protocol of the instance name (the instance name is SQLEXPRESS).
Enable Named Pipes and TCP/IP in the SQLEXPRESS protocol.
Click on the SQL Server service and restart SQL Server (SQLEXPRESS).
Reopen SQL Server Management Studio, select Database Engine as the server type, fill in the server name (local)\instance name or computer name\instance name (the computer name is your computer Name, the instance name is generally SQLEXPRESS or the instance name created when installing SQL), and select windows authentication for authentication.
Click the link and you can log in.
[Recommended learning: SQL video tutorial]
The above is the detailed content of What should I do if SQL cannot connect to the local server?. For more information, please follow other related articles on the PHP Chinese website!