简体   繁体   English

JBoss Wildfly应用程序服务器无法连接到SQL Server

[英]JBoss Wildfly application server not able to connect to SQL Server

I am trying to connect my application server (wildfly) with database server (MSSQL Server). 我正在尝试将我的应用程序服务器(wildfly)与数据库服务器(MSSQL Server)连接。 The things which I have already done: 我已经做过的事情:

  1. Enabled TCP/IP 启用的TCP / IP
  2. Using dynamic port 使用动态端口
  3. Database engine connected and running on dynamic port which is mentioned in TCP/IP properties TCP / IP属性中提到的数据库引擎已连接并在动态端口上运行
  4. SQL Server configuration manager services(sql server and browser) are running. SQL Server配置管理器服务(SQL Server和浏览器)正在运行。

But when I try to make connection in wildfly using this connection URL: 但是,当我尝试使用此连接URL在wildfly中建立连接时:

jdbc:jtds:sqlserver://INUH101293/TGK_REP;INSTANCE=SQLEXPRESS jdbc:jtds:sqlserver:// INUH101293 / TGK_REP; INSTANCE = SQLEXPRESS

Then I have a database connection error. 然后我有一个数据库连接错误。 In server.log error is caused by invalid connection URL syntax. 在server.log中,错误是由无效的连接URL语法引起的。

Caused by: java.sql.SQLException: The syntax of the connection URL 'jdbc:jtds:sqlserver://DBServerName:port/DBRepositoryName' is invalid. 引起原因:java.sql.SQLException:连接URL'jdbc:jtds:sqlserver:// DBServerName:port / DBRepositoryName'的语法无效。

I have checked my connection URL everywhere and its correct. 我已经检查了所有地方的连接URL及其正确性。

please find pics below: 请在下面找到图片:

数据库引擎正在运行并已连接

SQL服务器正在运行

启用TCP IP

组态

数据库引擎已连接到动态端口:-50427

TCP IP动态端口

如果我是正确的,并且您使用的是jTDS驱动程序,则应该注意,自2013年以来尚未对此版本进行更新。我建议您使用官方的Microsoft JDBC驱动程序,尽管它速度稍慢(至少这是我上次测得的速度)年)。

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

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