通过linux

时间:2015-07-23 05:35:05

标签: java sql-server linux jdbc

我试图从linux执行一个jar文件.jar包含用于连接到sql server的java代码。当我尝试执行jar时,我得到以下错误

com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host servername, port 1433 has failed. Error: "null. 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.".

connect属性文件似乎具有有效的用户名/密码。我检查了sql server配置管理器并启用了TCP / IP协议。我能够在winodws中执行相同的jar文件,并且sql server连接建立良好,没有任何问题。请让我知道我必须采取的步骤才能解决此问题。

非常感谢任何帮助。谢谢

0 个答案:

没有答案