473,394 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 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 3333
"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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.