简体   繁体   English

在WebSphere 8.5上遇到SQL Server连接问题

[英]Having trouble with SQL Server connection on WebSphere 8.5

I'm having all kinds of trouble getting IBM WebSphere 8.5 to connect to my SQL Server 2012 data source. 我很难将IBM WebSphere 8.5连接到我的SQL Server 2012数据源。 I have the URL of jdbc:sqlserver://localhost;userName=user;password=password . 我的URL为jdbc:sqlserver://localhost;userName=user;password=password See the following error (I know it's kind of long): 看到以下错误(我知道这很长):

The test connection operation failed for data source reachingrecovery on server server1 at node MWEISS7X16Node01 with the following exception: java.sql.SQLException: The TCP/IP connection to the host localhost, port 1433 has failed. 数据源到达节点MWEISS7X16Node01上的服务器server1上的数据源到达恢复的测试连接操作失败,发生以下异常:java.sql.SQLException:到主机本地主机,端口1433的TCP / IP连接失败。 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." 错误:“连接被拒绝:连接。请验证连接属性。请确保主机上正在运行SQL Server实例并在端口上接受TCP / IP连接。请确保防火墙未阻止与该端口的TCP连接”。

Now, the SQL server and WebSphere are running on the same machine, so I don't think it's a firewall issue. 现在,SQL Server和WebSphere在同一台机器上运行,因此我认为这不是防火墙问题。 I've checked the SQL server properties under "Connections", and it indicates that everything is fine ("Allow remote connections to the server" is checked.) 我已经检查了“连接”下的SQL Server属性,它指示一切正常(已选中“允许与服务器的远程连接”。)

I'm at a loss to understand why this is happening. 我茫然不明白为什么会这样。 Any suggestions? 有什么建议么? Thx Mimi Thx咪咪

I found out what the problem was. 我发现了问题所在。 I was using SQL Server Management Studio to check on whether it could make TCP/IP connections or not. 我正在使用SQL Server Management Studio来检查它是否可以建立TCP / IP连接。 What I should have been using was SQL Server Configuration Manager. 应该使用的是SQL Server配置管理器。 It had a thing on the left called "SQL Server Network Configuration". 它在左侧有一个叫做“ SQL Server网络配置”的东西。 I clicked on that, and it brought up "Protocols for server instance name ". 我单击了它,并显示了“ 服务器实例名称的协议”。 It had a thing on the right (TCP/IP), which indicated it was disabled. 它右边有一个东西(TCP / IP),表明它已被禁用。 I enabled that, restarted the SQL server, and it worked. 我启用了该功能,重新启动了SQL Server,它开始工作了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM