Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
作者:酷酷是懒虫 | 2024-06-24 09:20:45
赞
踩
named pipes provider, error: 40 - could not open a connection to sql server
Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
一、问题详述:
{"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)"}
二、解决方法:
从网上看了很多资料,按照其中一些步骤试了下,我主要做了以下几处修改。
1、开启TCP/IP:
开始--所有程序--SQL Server Configuration Manager--SQL Server Network Configuration--TCP/IP改为Enabled--重启SQL Server服务使改动生效。
2、开通1433端口:
Control Panle--Windows Firewall--Advanced settings--Inbound Rules--New Rule--选Port--TCP--Specific local ports设为:1433--可命名为SQL,继续直到完成。