处于同一域中的两台SQL Server 实例无法连接

处于同一个域中的两台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) (.Net SqlClient Data Provider)

 处于同一域中的两台SQL Server 实例无法连接

错误原因是远程Server的防火墙没有打开端口1433

1433端口用于远程连接,是Sql Server默认的端口,SQL Server服务使用两个端口:TCP-1433、UDP-1434。其中1433用于供SQL Server对外提供服务,1434用于向请求者返回SQL Server使用了哪个TCP/IP端口。

Solution

step1,打开FireWall,Advanced Settings

处于同一域中的两台SQL Server 实例无法连接

处于同一域中的两台SQL Server 实例无法连接

 

step2,New Inbound Rule,创建一个Port, TCP的端口号是 1433

Inbound Rules 显式定义允许或阻塞进入本地Server的规则

处于同一域中的两台SQL Server 实例无法连接

处于同一域中的两台SQL Server 实例无法连接

处于同一域中的两台SQL Server 实例无法连接

 step3,查看在FireWall中创建的Inbound Rule

处于同一域中的两台SQL Server 实例无法连接

作者悦光阴
本文版权归作者和博客园所有,欢迎转载,但未经作者同意,必须保留此段声明,且在文章页面醒目位置显示原文连接,否则保留追究法律责任的权利。





本文转自悦光阴博客园博客,原文链接:http://www.cnblogs.com/ljhdo/p/4794121.html,如需转载请自行联系原作者