[fix]-Cannot connect to local SQL Server
The machine has SQL Server Express installed. SQL Server services for SQL Server (SQLEXPRESS), SQL Server browser, also the DTC service are in started state. But error occurs when connecting to SQL Server Management Studio (locally).
TITLE: Connect to Server
Cannot connect to (local).
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)
Cannot connect to local SQL Server
With Windows 10:
Go to Control Panel -> Administrative Tools -> Services.
Scroll down and find SQL Server (SQLEXPRESS), and right-click on it.
Select “Start” from the popup window that shows up.
For connecting to the local express instanceuse the server connection as .\SQLEXPRESS.
Ensure that TCP/IP protocol is enabled in SQL Network Configurations. Also set the TCP Port to 1433 as shown below:
Use the server name as: (local)\SQLEXPRESS or localhost\SQLEXPRESS.
Fixes are applicable to the following versions of SQL Server:
- SQL Server 7.0 OLAP Tools
- SQL Server 2000 64-bit Edition
Related Error Tags:
- SQL Server 2008 R2 can't connect to local database in Management
- Cannot connect to local SQL Server with Management Studio
- I cannot connect to my local SQL Server 2008?
- Why can't I connect to my local SQL Server database instance?
- sql server 2008 r2 - Cannot connect to my local instance
- How to Troubleshoot Connecting to the SQL Server Database Engine
- authentication - Connecting to a local SQL Server instance fails
- SQL Server 2008 R2 can't connect to local database in Management studio