
November 12th, 2005, 07:25 AM
| | | client-server with db2
Hi,
This might seem like a basic question but I have some doubts, please
humour me.
I have a client-server application using java where each client on
each machine needs to directly communicate directly with the database.
Do I need a separate db2 connect on each such machine.
Please advice.
confised.
CT. | 
November 12th, 2005, 07:25 AM
| | | Re: client-server with db2
"CT" <come_try@yahoo.com> wrote in message
news:f2ca5893.0405171303.744bc49d@posting.google.c om...[color=blue]
> Hi,
>
> This might seem like a basic question but I have some doubts, please
> humour me.
>
> I have a client-server application using java where each client on
> each machine needs to directly communicate directly with the database.
> Do I need a separate db2 connect on each such machine.
>
> Please advice.
>
> confised.
>
> CT.[/color]
Please state operating system of DB2 Server, and Java clients. | 
November 12th, 2005, 07:26 AM
| | | Re: client-server with db2
CT wrote:
[color=blue]
> Hi,
>
> This might seem like a basic question but I have some doubts, please
> humour me.
>
> I have a client-server application using java where each client on
> each machine needs to directly communicate directly with the database.
> Do I need a separate db2 connect on each such machine.[/color]
No. But that may be a reasonable option for some.
There are a number of possibilities, depending on platform and how
you've written your code.
1A. Type 2 JDBC driver, connecting to a host database, such as DB2 for
z/OS.
Here, you need DB2 Connect on each machine, or you need one DB2 Connect
Enterprise Edition (or variant such as DB2 Connect Unlimited Edition or
DB2 Connect Application Server Edition), and you need a client, such as
the DB2 Runtime Client on each client machine.
In the first case, each machine is configured such that the instance
can talk directly to the host server. In the second, each machine
talks to the gateway, and the gateway talks to the host server. Either
way, the JDBC application does not need to know any difference.
1B. Type 4 JDBC driver, connecting to host database.
Here you need DB2 Connect somewhere, and a license that says you can
copy the type 4 JDBC driver, and its license jar file, to each client
machine. You don't need the rest of DB2, although you'll need to
install it somewhere to get the right jar files. Be aware that this is
licensed code, so you'll need to pay IBM accordingly.
2A. Type 2 JDBC driver, connecting to a Linux, Windows, or Unix
database.
Here you simply need the DB2 Client, such as DB2 Runtime Client, on
each machine. Configure the instance to talk to the server.
2B. Type 4 JDBC driver, connecting to a Linux, Windows, or Unix
database.
Here you need the DB2 Client, such as DB2 Runtime Client, on a single
machine. Just copy the type 4 JDBC driver to each machine where your
Java app is deployed.
I hope that covers your situation and anyone who googles this response
;-) | 
November 12th, 2005, 07:26 AM
| | | Re: client-server with db2
First wow!! Excellent reply. Thanks a lot.
[color=blue]
> CT wrote:
>[color=green]
> > Hi,
> >
> > This might seem like a basic question but I have some doubts, please
> > humour me.
> >
> > I have a client-server application using java where each client on
> > each machine needs to directly communicate directly with the database.
> > Do I need a separate db2 connect on each such machine.[/color]
>
> No. But that may be a reasonable option for some.
>
> There are a number of possibilities, depending on platform and how
> you've written your code.
>
> 1A. Type 2 JDBC driver, connecting to a host database, such as DB2 for
> z/OS.
>
> Here, you need DB2 Connect on each machine, or you need one DB2 Connect
> Enterprise Edition (or variant such as DB2 Connect Unlimited Edition or
> DB2 Connect Application Server Edition), and you need a client, such as
> the DB2 Runtime Client on each client machine.
>
> In the first case, each machine is configured such that the instance
> can talk directly to the host server. In the second, each machine
> talks to the gateway, and the gateway talks to the host server. Either
> way, the JDBC application does not need to know any difference.
>
> 1B. Type 4 JDBC driver, connecting to host database.
>
> Here you need DB2 Connect somewhere, and a license that says you can
> copy the type 4 JDBC driver, and its license jar file, to each client
> machine. You don't need the rest of DB2, although you'll need to
> install it somewhere to get the right jar files. Be aware that this is
> licensed code, so you'll need to pay IBM accordingly.
>[/color]
I have to connect to DB2 on z/os v 7.1 through various clients such as
winx or linux or unix. So far I have been able to install db2 connect
on each of these machines and connect to db2 using jdbc type 2 driver.
But until now I did not know that there existed a type 4 driver for
db2 on the host. Where can I get my hands on that and is type4 better
than type2 interms of performance and ease of deployment (I could just
copy the db2java.zip or variant and the licence.jar with my
distribution) Licensing is fine, we are db2 shop. But more important,
are there articles or info about type4 drivers to connect to db2 on
the host?
[color=blue]
> 2A. Type 2 JDBC driver, connecting to a Linux, Windows, or Unix
> database.
>
> Here you simply need the DB2 Client, such as DB2 Runtime Client, on
> each machine. Configure the instance to talk to the server.
>
> 2B. Type 4 JDBC driver, connecting to a Linux, Windows, or Unix
> database.
>
> Here you need the DB2 Client, such as DB2 Runtime Client, on a single
> machine. Just copy the type 4 JDBC driver to each machine where your
> Java app is deployed.
>[/color]
Again on a test platform, I am using db2 v8 on winx machine and using
db2connect to connect to this machine using jdbc type2. How can I
connect to db2 using type4. Again in your opinion (you do seem to know
your stuff), what is better, type2 or type4, for me at least, more
important is performance under heavvvy load and next is ease of
deployment on individual machines. My target program will be installed
on over 200 machines at a time, so deployment is important, since all
I am thinking about right now is webstart.
[color=blue]
>
> I hope that covers your situation and anyone who googles this response
> ;-)[/color]
It does and thanks again. I hope ppl google this. Hope to hear from
you and others on my further questions.
CT. | 
November 12th, 2005, 07:26 AM
| | | question - Re: client-server with db2
question -- do I need db2 connect in addition to runtime client on
each client machine inorder for .app or .net to work? ome_try@yahoo.com (CT) wrote in message news:<f2ca5893.0405180926.4f0c2ae4@posting.google. com>...[color=blue]
> First wow!! Excellent reply. Thanks a lot.
>[color=green]
> > CT wrote:
> >[color=darkred]
> > > Hi,
> > >
> > > This might seem like a basic question but I have some doubts, please
> > > humour me.
> > >
> > > I have a client-server application using java where each client on
> > > each machine needs to directly communicate directly with the database.
> > > Do I need a separate db2 connect on each such machine.[/color]
> >
> > No. But that may be a reasonable option for some.
> >
> > There are a number of possibilities, depending on platform and how
> > you've written your code.
> >
> > 1A. Type 2 JDBC driver, connecting to a host database, such as DB2 for
> > z/OS.
> >
> > Here, you need DB2 Connect on each machine, or you need one DB2 Connect
> > Enterprise Edition (or variant such as DB2 Connect Unlimited Edition or
> > DB2 Connect Application Server Edition), and you need a client, such as
> > the DB2 Runtime Client on each client machine.
> >
> > In the first case, each machine is configured such that the instance
> > can talk directly to the host server. In the second, each machine
> > talks to the gateway, and the gateway talks to the host server. Either
> > way, the JDBC application does not need to know any difference.
> >
> > 1B. Type 4 JDBC driver, connecting to host database.
> >
> > Here you need DB2 Connect somewhere, and a license that says you can
> > copy the type 4 JDBC driver, and its license jar file, to each client
> > machine. You don't need the rest of DB2, although you'll need to
> > install it somewhere to get the right jar files. Be aware that this is
> > licensed code, so you'll need to pay IBM accordingly.
> >[/color]
>
> I have to connect to DB2 on z/os v 7.1 through various clients such as
> winx or linux or unix. So far I have been able to install db2 connect
> on each of these machines and connect to db2 using jdbc type 2 driver.
> But until now I did not know that there existed a type 4 driver for
> db2 on the host. Where can I get my hands on that and is type4 better
> than type2 interms of performance and ease of deployment (I could just
> copy the db2java.zip or variant and the licence.jar with my
> distribution) Licensing is fine, we are db2 shop. But more important,
> are there articles or info about type4 drivers to connect to db2 on
> the host?
>[color=green]
> > 2A. Type 2 JDBC driver, connecting to a Linux, Windows, or Unix
> > database.
> >
> > Here you simply need the DB2 Client, such as DB2 Runtime Client, on
> > each machine. Configure the instance to talk to the server.
> >
> > 2B. Type 4 JDBC driver, connecting to a Linux, Windows, or Unix
> > database.
> >
> > Here you need the DB2 Client, such as DB2 Runtime Client, on a single
> > machine. Just copy the type 4 JDBC driver to each machine where your
> > Java app is deployed.
> >[/color]
>
> Again on a test platform, I am using db2 v8 on winx machine and using
> db2connect to connect to this machine using jdbc type2. How can I
> connect to db2 using type4. Again in your opinion (you do seem to know
> your stuff), what is better, type2 or type4, for me at least, more
> important is performance under heavvvy load and next is ease of
> deployment on individual machines. My target program will be installed
> on over 200 machines at a time, so deployment is important, since all
> I am thinking about right now is webstart.
>
>[color=green]
> >
> > I hope that covers your situation and anyone who googles this response
> > ;-)[/color]
>
> It does and thanks again. I hope ppl google this. Hope to hear from
> you and others on my further questions.
>
> CT.[/color] | 
November 12th, 2005, 07:26 AM
| | | Re: client-server with db2
CT wrote:
[color=blue]
> First wow!! Excellent reply. Thanks a lot.
>[color=green]
>> CT wrote:
>>[color=darkred]
>> > Hi,
>> >
>> > This might seem like a basic question but I have some doubts, please
>> > humour me.
>> >
>> > I have a client-server application using java where each client on
>> > each machine needs to directly communicate directly with the database.
>> > Do I need a separate db2 connect on each such machine.[/color]
>>
>> No. But that may be a reasonable option for some.
>>
>> There are a number of possibilities, depending on platform and how
>> you've written your code.
>>
>> 1A. Type 2 JDBC driver, connecting to a host database, such as DB2 for
>> z/OS.
>>
>> Here, you need DB2 Connect on each machine, or you need one DB2 Connect
>> Enterprise Edition (or variant such as DB2 Connect Unlimited Edition or
>> DB2 Connect Application Server Edition), and you need a client, such as
>> the DB2 Runtime Client on each client machine.
>>
>> In the first case, each machine is configured such that the instance
>> can talk directly to the host server. In the second, each machine
>> talks to the gateway, and the gateway talks to the host server. Either
>> way, the JDBC application does not need to know any difference.
>>
>> 1B. Type 4 JDBC driver, connecting to host database.
>>
>> Here you need DB2 Connect somewhere, and a license that says you can
>> copy the type 4 JDBC driver, and its license jar file, to each client
>> machine. You don't need the rest of DB2, although you'll need to
>> install it somewhere to get the right jar files. Be aware that this is
>> licensed code, so you'll need to pay IBM accordingly.
>>[/color]
>
> I have to connect to DB2 on z/os v 7.1 through various clients such as
> winx or linux or unix. So far I have been able to install db2 connect[/color]
^
Too many x's. ;-)
[color=blue]
> on each of these machines and connect to db2 using jdbc type 2 driver.
> But until now I did not know that there existed a type 4 driver for
> db2 on the host. Where can I get my hands on that and is type4 better
> than type2 interms of performance and ease of deployment (I could just
> copy the db2java.zip or variant and the licence.jar with my
> distribution) Licensing is fine, we are db2 shop. But more important,
> are there articles or info about type4 drivers to connect to db2 on
> the host?[/color]
I know the type 4 driver is available in DB2 for LUW v8. I'm not sure
if it's in DB2 v7 or earlier. Please also note that pretty much
everything I refer to, unless I explicitly say "host" or "z/OS" is
referring to DB2 on Linux, Unix, or Windows since that is where pretty
much all my knowledge is.
As for using the type 4 driver, you may want to check out the v8.1
documentation - it should be documented there.
As for performance and ease of deployment - to be honest, I don't know.
I don't write Java. ;-) On one hand, it's easier to deploy in that
you don't need the whole DB2 client installed. On the other hand,
applying fixpaks is painful in that you may have a harder time tracking
what fixpak level a hand-copied db2jcc.zip file is at. Because you
copied it, and not the installer, the installer can't keep track of it
for you. Performance? I really, really don't know.
Oh - and the type 4 driver's connect string is radically different (or
as radical as it gets given the format JDBC imposes on it). You need
to know the server's hostname and port number. With type 2, that
information is in the instance configuration when you catalog the host
and database. Thus, with type 2, you can easily run your application
against a test server or swap back to the production server simply by
switching instances, or uncatalog/recatalog. With type 4, you point
directly at the server - which means that you need to have a dynamic
connect string, perhaps one that reads from a configuration file of its
own. Then you can swap your config file from test.config to
production.config and back as you need.
[color=blue][color=green]
>> 2A. Type 2 JDBC driver, connecting to a Linux, Windows, or Unix
>> database.
>>
>> Here you simply need the DB2 Client, such as DB2 Runtime Client, on
>> each machine. Configure the instance to talk to the server.
>>
>> 2B. Type 4 JDBC driver, connecting to a Linux, Windows, or Unix
>> database.
>>
>> Here you need the DB2 Client, such as DB2 Runtime Client, on a single
>> machine. Just copy the type 4 JDBC driver to each machine where your
>> Java app is deployed.
>>[/color]
>
> Again on a test platform, I am using db2 v8 on winx machine and using
> db2connect to connect to this machine using jdbc type2. How can I
> connect to db2 using type4. Again in your opinion (you do seem to know[/color]
It's a different JDBC connect string.
[color=blue]
> your stuff), what is better, type2 or type4, for me at least, more[/color]
As I said above, I don't use Java. I'm a perl (ab)user myself. But
I've seen enough written here and elsewhere to piece it together with
what I do know.
[color=blue]
> important is performance under heavvvy load and next is ease of
> deployment on individual machines. My target program will be installed
> on over 200 machines at a time, so deployment is important, since all
> I am thinking about right now is webstart.[/color]
From what I've read, both type 2 and type 4 have their benefits. But I
don't remember what they are ;-) Hopefully someone else will reply who
is more familiar with different type drivers for JDBC.
[color=blue][color=green]
>> I hope that covers your situation and anyone who googles this response
>> ;-)[/color]
>
> It does and thanks again. I hope ppl google this. Hope to hear from
> you and others on my further questions.[/color] | 
November 12th, 2005, 07:26 AM
| | | Re: question - Re: client-server with db2
sea wrote:
[color=blue]
> question -- do I need db2 connect in addition to runtime client on
> each client machine inorder for .app or .net to work?[/color]
The only reason you need DB2 Connect is to connect to a host database,
such as DB2 for z/OS.
DB2 Connect also embeds all the functionality of the DB2 clients, thus
you never need to install both.
Hope that helps. | 
November 12th, 2005, 07:26 AM
| | | Re: question - Re: client-server with db2
Yes, you need DB2 Connect.
sea wrote:
[color=blue]
> question -- do I need db2 connect in addition to runtime client on
> each client machine inorder for .app or .net to work?
>
>
> ome_try@yahoo.com (CT) wrote in message news:<f2ca5893.0405180926.4f0c2ae4@posting.google. com>...
>[color=green]
>>First wow!! Excellent reply. Thanks a lot.
>>
>>[color=darkred]
>>>CT wrote:
>>>
>>>
>>>>Hi,
>>>>
>>>>This might seem like a basic question but I have some doubts, please
>>>>humour me.
>>>>
>>>>I have a client-server application using java where each client on
>>>>each machine needs to directly communicate directly with the database.
>>>>Do I need a separate db2 connect on each such machine.
>>>
>>>No. But that may be a reasonable option for some.
>>>
>>>There are a number of possibilities, depending on platform and how
>>>you've written your code.
>>>
>>>1A. Type 2 JDBC driver, connecting to a host database, such as DB2 for
>>>z/OS.
>>>
>>>Here, you need DB2 Connect on each machine, or you need one DB2 Connect
>>>Enterprise Edition (or variant such as DB2 Connect Unlimited Edition or
>>>DB2 Connect Application Server Edition), and you need a client, such as
>>>the DB2 Runtime Client on each client machine.
>>>
>>>In the first case, each machine is configured such that the instance
>>>can talk directly to the host server. In the second, each machine
>>>talks to the gateway, and the gateway talks to the host server. Either
>>>way, the JDBC application does not need to know any difference.
>>>
>>>1B. Type 4 JDBC driver, connecting to host database.
>>>
>>>Here you need DB2 Connect somewhere, and a license that says you can
>>>copy the type 4 JDBC driver, and its license jar file, to each client
>>>machine. You don't need the rest of DB2, although you'll need to
>>>install it somewhere to get the right jar files. Be aware that this is
>>>licensed code, so you'll need to pay IBM accordingly.
>>>[/color]
>>
>>I have to connect to DB2 on z/os v 7.1 through various clients such as
>>winx or linux or unix. So far I have been able to install db2 connect
>>on each of these machines and connect to db2 using jdbc type 2 driver.
>>But until now I did not know that there existed a type 4 driver for
>>db2 on the host. Where can I get my hands on that and is type4 better
>>than type2 interms of performance and ease of deployment (I could just
>>copy the db2java.zip or variant and the licence.jar with my
>>distribution) Licensing is fine, we are db2 shop. But more important,
>>are there articles or info about type4 drivers to connect to db2 on
>>the host?
>>
>>[color=darkred]
>>>2A. Type 2 JDBC driver, connecting to a Linux, Windows, or Unix
>>>database.
>>>
>>>Here you simply need the DB2 Client, such as DB2 Runtime Client, on
>>>each machine. Configure the instance to talk to the server.
>>>
>>>2B. Type 4 JDBC driver, connecting to a Linux, Windows, or Unix
>>>database.
>>>
>>>Here you need the DB2 Client, such as DB2 Runtime Client, on a single
>>>machine. Just copy the type 4 JDBC driver to each machine where your
>>>Java app is deployed.
>>>[/color]
>>
>>Again on a test platform, I am using db2 v8 on winx machine and using
>>db2connect to connect to this machine using jdbc type2. How can I
>>connect to db2 using type4. Again in your opinion (you do seem to know
>>your stuff), what is better, type2 or type4, for me at least, more
>>important is performance under heavvvy load and next is ease of
>>deployment on individual machines. My target program will be installed
>>on over 200 machines at a time, so deployment is important, since all
>>I am thinking about right now is webstart.
>>
>>
>>[color=darkred]
>>>I hope that covers your situation and anyone who googles this response
>>>;-)[/color]
>>
>>It does and thanks again. I hope ppl google this. Hope to hear from
>>you and others on my further questions.
>>
>>CT.[/color][/color] | | Thread Tools | Search this Thread | | | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 205,248 network members.
|