By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,160 Members | 1,983 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,160 IT Pros & Developers. It's quick & easy.

Instance choice in JDBC url connection

P: n/a
Hello all,

I'm using DB2 UDB 7.2 on a Linux server and I've installed the DB2
client on my Windows 2000 machine. I've defined on my client two
instances, one for test databases and one for production databases
and I've cataloged the same database (of course with the same name)
in both instances (these instances and databases have correspondents
on the server). I'm using for my Java tests the application driver
"COM.ibm.db2.jdbc.app.DB2Driver" (JDBC version 2.0) and all goes
well. My problem is I would like defining in the connection url the
instance where is located the database, avoiding the modification
of the environment variable DB2INSTANCE. Is there some property I
can specify in the url that defines the instance to use?

Thanks in advance for any reply.
Stefano Gibellini
Jun 27 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Stefano,

Maybe you should use port number in jdbc url. Then you could specify
TCP/IP port for each instance service, for example:

- jdbc:db2://server:50000/dbname:params for first instance
- jdbc:db2://server:50001/dbname:params for second one

Marcin
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.