472,354 Members | 1,800 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,354 software developers and data experts.

client-server with db2

CT
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.
Nov 12 '05 #1
7 3188
"CT" <co******@yahoo.com> wrote in message
news:f2**************************@posting.google.c om...
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.


Please state operating system of DB2 Server, and Java clients.
Nov 12 '05 #2
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.

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
;-)

Nov 12 '05 #3
CT
First wow!! Excellent reply. Thanks a lot.
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.


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?
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.

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.


I hope that covers your situation and anyone who googles this response
;-)


It does and thanks again. I hope ppl google this. Hope to hear from
you and others on my further questions.

CT.
Nov 12 '05 #4
sea
question -- do I need db2 connect in addition to runtime client on
each client machine inorder for .app or .net to work?
om*****@yahoo.com (CT) wrote in message news:<f2**************************@posting.google. com>...
First wow!! Excellent reply. Thanks a lot.
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.


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?
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.


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.


I hope that covers your situation and anyone who googles this response
;-)


It does and thanks again. I hope ppl google this. Hope to hear from
you and others on my further questions.

CT.

Nov 12 '05 #5
CT wrote:
First wow!! Excellent reply. Thanks a lot.
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.


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

^
Too many x's. ;-)
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?
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.
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.


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


It's a different JDBC connect string.
your stuff), what is better, type2 or type4, for me at least, more
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.
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.


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.
I hope that covers your situation and anyone who googles this response
;-)


It does and thanks again. I hope ppl google this. Hope to hear from
you and others on my further questions.

Nov 12 '05 #6
sea wrote:
question -- do I need db2 connect in addition to runtime client on
each client machine inorder for .app or .net to work?


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.
Nov 12 '05 #7
Yes, you need DB2 Connect.

sea wrote:
question -- do I need db2 connect in addition to runtime client on
each client machine inorder for .app or .net to work?
om*****@yahoo.com (CT) wrote in message news:<f2**************************@posting.google. com>...
First wow!! Excellent reply. Thanks a lot.

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.


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?

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.


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.
I hope that covers your situation and anyone who googles this response
;-)


It does and thanks again. I hope ppl google this. Hope to hear from
you and others on my further questions.

CT.


Nov 12 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rhino | last post by:
I am trying to verify that I correctly understand something I saw in the DB2 Information Center. I am running DB2 Personal Edition V8.2.1 on Windows. I came across the following in the Info...
5
by: Paul H | last post by:
How do you folks get a reliable and complete brief of what is required before development starts? I am forever going back to a client once a project has started saying "Hang on, now that I've...
7
by: Nalaka | last post by:
Hi, I created a sinple web service that returns a dataSet. Then I created a client program that uses this web service (that returns the Dataset). My question is, how did the client figure...
11
by: pshindle | last post by:
We have several machines currently running the DB2 V7 Run-time Client that we would like to actually be running the App Dev Client. To 'upgrade' (within the same version) this client software can...
2
by: J Huntley Palmer | last post by:
I am having a horrific time integrating uw-imap's c-client for imap support in php. The problem is a whole bunch of "Text relocation remains referenced against symbol" errors during linking....
11
by: Wayne | last post by:
I am a one man enterprise and have been asked by a prospective client what happens to their database regarding ongoing changes etc if I get hit by a bus. Obviously my databases are distributed...
1
by: WebServiceSecurity | last post by:
The issue involves the following technologies: - 1. .NET 2.0 Framework 2. WSE2.0 (WS-Security) 3. X.509 certificates 4. BEA Weblogic 8.1.5
3
by: rjha94 | last post by:
Hi I just installed the runtime client on my windows machine. when i go inside the SQLLIB\bin folder i can see db2.exe. is it possible to use this db2 bundled with runtime client for command line...
4
MMcCarthy
by: MMcCarthy | last post by:
http://bytes.com/images/howtos/projectscope_blocks.jpgAs a freelance IT consultant for over 10 years, Iíve come to appreciate well defined project scopes. A project scope is a common understanding...
11
by: Bill Davy | last post by:
I am trying to edit Contacts in Outlook. This is so I can transfer numbers from my address book which is an Excel spreadsheet to my mobile phone. I came across the following snippet of code which...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
1
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.