简体   繁体   English

如何在JBoss EAP 6中的XA数据源上指定SQL Server数据库实例名称?

[英]How to specify SQL Server database instance name on XA datasource in JBoss EAP 6?

Connection properties for XA datasources in JBoss EAP 6 are configured in XA properties tab, eg using the ServerName , DatabaseName and PortNumber properties. 在XA属性选项卡中配置了JBoss EAP 6中XA数据源的连接属性,例如,使用ServerNameDatabaseNamePortNumber属性。 How to specify the SQL Server database instance name I want the data source to connect to? 如何指定要数据源连接到的SQL Server数据库实例名称

In jtds I use the pattern: jdbc:jtds:sqlserver:// @ServerName / @DatabaseName ;instance= @InstanceName 在jtds中,我使用以下模式:jdbc:jtds:sqlserver:// @ServerName / @DatabaseName ; instance = @InstanceName

Apparently the @InstanceName should be specified as a part of @ServerName , as follows: 显然, @ InstanceName应该指定为@ServerName的一部分,如下所示:

@ServerName\\\\ @InstanceName @ServerName \\\\ @InstanceName

Note the double backslash is necessary while using the Admin Console Add dialog (Properties tab) - it will be automatically converted to single backslash. 请注意,使用管理控制台“添加”对话框(“属性”标签)时,必须使用双反斜杠-它会自动转换为单反斜杠。 If a single backslash is entered, it is not possible to add the property at all (there is no warning/error message showed though). 如果输入单个反斜杠,则根本无法添加该属性(尽管没有显示警告/错误消息)。

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

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