com.microsoft.sqlserver.jdbc.SQLServerException:与主机localhost,端口1433的TCP / IP连接失败 [英] com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed

查看:91
本文介绍了com.microsoft.sqlserver.jdbc.SQLServerException:与主机localhost,端口1433的TCP / IP连接失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我继续收到此错误。我尝试了一个来自stackoverflow的解决方案(下面),这对我来说不起作用 -
连接到SQL服务器时出现SQL异常

I keep on getting this error. I tried one solution from stackoverflow (below) which did not work for me - SQL Exception while connecting to SQL server

我尝试通过链接使用Windows防火墙中的端口1433,这也不起作用。
请参阅在Windows防火墙中打开TCP访问端口部分
http://msdn.microsoft.com/en-us/library/ms175043.aspx

I tried allowing port 1433 in the windows firewall by using a link, that did not work too. Refer to section "To open a port in the Windows firewall for TCP access" http://msdn.microsoft.com/en-us/library/ms175043.aspx

com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP 
connection to the host localhost, port 1433 has failed. Error: 
"Connection refused: connect. Verify the connection properties. 
Make sure that an instance of SQL Server is running on the host 
and accepting TCP/IP connections at the port. Make sure that TCP 
connections to the port are not blocked by a firewall.

请帮我解决这个问题。

谢谢

推荐答案

你需要去
开始> Microsoft SQL Server>配置工具> SQL Server配置管理器

当它打开转到

SQL Server Configuration Manager > SQL Server Network Configuration > Protocols for SQLExpress 

在哪里可以找到协议TCP / IP,如果禁用则启用它单击TCP / IP,您将找到其属性。

Where you'll find the Protocol TCP/IP, if disabled then Enable it Click on TCP/IP, You'll find its properties.

在此属性删除所有TCP动态端口并将值1433添加到所有TCP端口

a nd重新启动 SQL Server服务> SQL Server

完成它。

这篇关于com.microsoft.sqlserver.jdbc.SQLServerException:与主机localhost,端口1433的TCP / IP连接失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆