Google Groups Home
Help | Sign in
Instance choice in JDBC url connection
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Stefano Gibellini  
View profile
 More options May 10, 4:42 am
Newsgroups: comp.databases.ibm-db2
From: "Stefano Gibellini" <stefano.gibell...@comune.modena.it>
Date: Sat, 10 May 2008 10:42:05 +0200
Local: Sat, May 10 2008 4:42 am
Subject: Instance choice in JDBC url connection
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marcin 'frodo2000' Molak  
View profile
 More options May 16, 3:43 am
Newsgroups: comp.databases.ibm-db2
From: "Marcin 'frodo2000' Molak" <frodo2...@gmail.com>
Date: Fri, 16 May 2008 00:43:11 -0700 (PDT)
Local: Fri, May 16 2008 3:43 am
Subject: Re: Instance choice in JDBC url connection
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google