DB2 Version 9.7 for Linux, UNIX, and Windows

Options for connecting to DB2 databases

This section outlines the options for what you can install on a machine (the local system) to enable it to connect to a database on a different machine (the remote system). To select a suitable option, you first need to consider whether the local system is:
You also need to determine where the databases reside that you want to connect to. The databases could be located:

Options for business user systems or application servers

Typically, when a business application connects to a database, one of the following topologies is involved:

If a DB2 server is installed on the same machine as the application, there is no need to install a separate client. The DB2 server product includes functionality to enable applications to connect to local databases and to connect to databases on remote machines, as well.

If the machine 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-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 machine 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 machine 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 machine 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 install 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) you should use the non-DB2 instance merge modules to avoid instance management.
  • Non-DB2 instance merge modules. These merge modules create a non-DB2 instance environment. 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 install 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 functionality of the IBM Data Server Runtime Client plus tools used for client-server configuration, database administration and application development. The points below 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:

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 machine, there is no need to install a separate IBM data server client. The DB2 server product includes all functionality available in a standalone Data Server Client.

Options for administrator workstations

A database administrator can perform administration 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 perform administration activities on one or more DB2 servers remotely from an administrator workstation. The options and considerations are the following:
  • Install the IBM Data Server Runtime Client. This option is suitable if you only use the Command Line Processor (CLP) for administration.
  • Install the IBM Data Server Client. This client includes all the functionality of the Data Server Runtime Client plus tools used for client-server configuration, database administration and application development. Functionality includes the graphical administration tools such as the Configuration Assistant and Control Center (available on supported platforms). These tools use the DB2 Administration Server (DAS) on the DB2 server, which is setup by default during DB2 server installation.
  • Install a DB2 server product. Any time a DB2 server is installed on a machine, there is no need to install a separate IBM data server client. The DB2 server product includes all the functionality available in any standalone 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 non-IBM 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 options and considerations are the following:
  • 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 usually 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 via 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.