You need to take many considerations into account when
determining the most suitable connection method for your environment.
This section outlines the options for what you can install on a
local system to enable it to connect to a database on a different
remote server. To select a suitable option, you first need to consider
whether the local system is:
- A system that runs business applications on a business user's
system or on an application server.
- An application development workstation.
- A database administrator workstation.
You also need to determine where the databases that you want to
connect to is located. The database might be located:
- On same system, that is, on the local system, such as databases in
a single DB2® instance or in
various DB2 instances.
- On different servers, such as on remote systems.
- On different servers that are midrange or mainframe servers.
Options for business user systems or application servers
Typically,
when a business application connects to a database, one of the following
topologies is involved:
- An application connects to a DB2 database
where both are on the same server. An example is an application used
by a single user on their personal workstation.
- An application connects to a DB2 database
on another server.
- An application client connects to an application server which,
in turn, connects to one or more DB2 databases
located:
- On the same server only.
- On one or more servers.
- A combination of the preceding locations.
If a DB2 server is installed
on the same server as the application, there is no need to install
a separate client. The DB2 server
product includes functions to enable applications to connect to local
databases and to connect to databases on remote servers, as well.
If
the server with the application does not also have a DB2 server, you have the following options to
enable applications to connect to remote DB2 databases:
- DB2 application driver. With
a DB2 application driver, the
information needed to connect to a database is included in the application
or the application prompts the user to provide it. This approach differs
from an IBM® data server client which
maintains this information in its catalog. The application driver
is deployed as a file in the application directory so no separate DB2 database server specific installation
or setup is required. Typically, an application driver is packaged
with an application in a manner that provides connectivity only for
that application. A DB2 application driver
can coexist on the same server with other DB2 application drivers or with an IBM data server client. DB2 products provide drivers for Java™ (JDBC and SQLJ) and for ODBC,
CLI, .NET, OLE DB, or open source applications. Drivers can be obtained
by copying driver files from an IBM Data
Server Driver Package installation image or by downloading
the driver files from developerWorks®.
- IBM data server client. This
option involves installing and configuring one of the clients included
with the DB2 product. The IBM data server client is
installed on any server that connects directly to the DB2 database. Depending on the application topology,
the client is installed on each business user workstation or on an
application server. A single IBM data server client can
enable all applications on the server to connect to one or more DB2 databases on other machines.
- DB2 instance merge modules. These
merge modules create a DB2 instance
environment. This approach provides a way to deploy the IBM Data Server Runtime Client by
including the files in the corresponding modules. This approach is
targeted for use with Windows Installer
and other installation tools that support Windows Installer merge modules. With this
approach, a single installation program installs both the application and the Data Server Runtime Client. If
you do not require an instance environment or a command line processor
(CLP), then use a secondary type of instance merge modules to avoid
instance management.
- Other instance merge modules. These merge modules create an
instance environment in database other than DB2. This approach provides a way to deploy the IBM Data
Server Driver Package by including the client DLL files in
the application deployment package. This approach is targeted for
use with Windows Installer
and other installation tools that support Windows Installer merge modules. With this
approach, a single installation program installs both the application
and the IBM Data
Server Driver Package.
Options for application development workstations
The IBM Data
Server Client provides
all the functions of the IBM Data Server Runtime Client plus
tools used for client-server configuration, database administration,
and application development. The following points describe the role
and setup of the Data Server
Client in
light of the other tools and products used by application developers.
There
are several tools and products typically used by application developers
who write code to access a DB2 database.
Each developer workstation typically includes the following components:
- An integrated development environment (IDE) such as IBM Data Studio, IBM Optim™ Development Studio, Rational® Application Developer or Microsoft Visual Studio.
- A DB2 specific development
tool related to the IDE such as IBM Database Add-ins
for Microsoft Visual Studio.
- Access to a database server to host the database they are developing.
This database server can be in one or both of the following locations:
- On each developer's workstation, so each developer has their own
local copy of the database.
- On a workgroup server, so multiple developers work on the same
copy of the database.
With the foregoing as context, the value of the Data Server
Client is
that it provides headers and libraries required to compile applications
and provides tools for database administration. However, it is not
always necessary to install the Data Server
Client to
obtain these tools. Any time a DB2 server
is installed on a server, there is no need to install a separate IBM data server client.
The DB2 server product includes
all functions available in a stand-alone Data Server
Client.
Options for administrator workstations
A
database administrator can administer tasks on remote databases in
one of two major ways. They use a tool, such as telnet, to connect
to an individual database server machine and run DB2 administrator commands locally. Alternatively,
they can run tools and commands from their workstation that make connections
to the remote databases. This section focuses on the second case which
involves choices about which IBM data server client to
use and where to install it.
DB2 provides
various means to administer activities on one or more DB2 servers remotely from an administrator workstation.
The following options and considerations are available:
- Install the IBM Data Server Runtime Client. This
option is suitable if you use the command line processor (CLP) for
administration.
- Install the IBM Data
Server Client. This
client includes all the functions of the Data Server Runtime Client plus
tools used for client-server configuration, database administration,
and application development. Functions include the graphical administration
tools such as the InfoSphere® Optim Configuration Manager and IBM Data Studio (available on supported
platforms). These tools use the DB2 Administration
Server (DAS) on the DB2 server,
which is set up by default during DB2 server
installation.
- Install a DB2 server
product. Any time a DB2 server
is installed on a server, there is no need to install a separate IBM data server client.
The DB2 server product includes
all the functions available in any stand-alone IBM data server client.
Options for connecting to midrange and mainframe databases
With DB2 Connect™ products, you
can connect to DB2 databases
on mainframe and midrange platforms, namely OS/390® and z/OS®, System i®,
VSE, and VM. You can also connect to other databases that comply with
the Distributed Relational Database Architecture™ (DRDA®).
With DB2 Connect, you
can connect from a user's workstation or from a DB2 for Linux, UNIX, or Windows server.
The following options
and considerations are available:
- IBM Data
Server Driver Package. This lightweight deployment
solution that provides runtime support for applications using ODBC,
CLI, .NET, OLE DB, PHP, Ruby, JDBC, or SQLJ without the need of installing Data Server Runtime Client or Data Server
Client.
To connect to a z/OS server
or a System i server, you
must register a DB2 Connect license
key. (Retrieve the license file from your Passport Advantage® distribution,
for example db2conpe.lic, then copy the license file to the license
directory under the directory where the driver was installed.)
- DB2 Connect Personal
Edition. This product is installed on a workstation and provides
connectivity from that workstation. This option is targeted for situations
where there is a need to connect from a workstation directly to one
or more hosts. This product is available for Linux, Solaris and Windows operating systems.
- DB2 Connect server
Editions. A server edition of the DB2 Connect product is installed on
a connectivity server and serves as a gateway to supported mainframe
or midrange database servers. A server edition of the DB2 Connect product enables workstations
with IBM data server
clients to
setup access to host systems with the DB2 Connect gateway as if they were databases
on DB2 on Windows, Linux, and UNIX.
Both options can be used concurrently. For example, a workstation
can connect to a midrange or mainframe database in the following ways:
- Install DB2 Connect Personal
Edition locally and use it to connect directly to a host.
- Connect to the same or different host through an intermediate DB2 Connect server gateway.