简体   繁体   English

具有实例名称的DB2 JDBC连接URL

[英]DB2 JDBC connection url with instance name

Current JDBC URL using looks like jdbc:db2://server:446/DBname 当前使用的JDBC URL类似于jdbc:db2:// server:446 / DBname

Want to connect to a different instance by providing the instance name. 想要通过提供实例名称来连接到其他实例。 How should be the connection string for this? 连接字符串应该如何?

In jdbc you do not connect to an instance, instead you connect to a database. 在jdbc中,您不连接到实例,而是连接到数据库。 It is possible to ATTACH to a DB2-instance but normally you don't want to do that unless you are a DBA. 可以附加到DB2实例,但是通常除非您是DBA,否则您不希望这样做。 To specify a different DB2-instance, mention its hostname(or IP-address, or Virtual-IP-address) and its port-number. 要指定一个不同的DB2实例,何况它的主机名(或IP地址,或虚拟IP地址) 端口号。 If a hostname runs multiple DB2-instances, each DB2-instance will have a unique port-number on that hostname. 如果一个主机名运行多个DB2实例,则每个DB2实例在该主机名上将具有唯一的端口号。

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

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