- 1.1 Brief History of DB2
- 1.2 The Role of DB2 in the Information On Demand World
- 1.3 DB2 EDITIONS
- 1.4 DB2 Clients
- 1.5 Try-and-Buy Versions
- 1.6 Host Connectivity
- 1.7 Federation Support
- 1.8 Replication Support
- 1.9 IBM WebSphere Federation Server and WebSphere Replication Server
- 1.10 Special Package Offerings for Developers
- 1.11 DB2 Syntax Diagram Conventions
- 1.12 Case Study
- 1.13 Summary
- 1.14 Review Questions
1.4 DB2 Clients
To connect from a client to a DB2 data server database, you usually need to install DB2 client software on the client machine. This isn't always required; for example, this isn't necessary for a JDBC application using the Type 4 driver running on the client machine. We provide more detail about connectivity scenarios in Chapter 6, Configuring Client and Server Connectivity.
A DB2 client installed on a different machine than the DB2 server is known as a remote client. A remote client can establish communication to the server using TCP/IP or Named Pipes (Windows only).
If the DB2 client is installed on the same machine as a DB2 server, then it is known as a local client, and it connects to the server using inter-process communication (IPC). Note that since all DB2 servers come with a local client component, you don't need to install the DB2 client separately after installing a DB2 server. Figure 1.10 shows local and remote clients. Client Machine 1 and 2 are remote clients with the DB2 client code installed and are accessing Server Machine A, which has a DB2 server installed. The DB2 server has a client component that is the local client.
Figure 1.10 Local and remote clients
There are three types of clients in DB2:
- Thin client
- IBM Data Server Runtime client
- IBM Data Server client
and there are two drivers:
- IBM Data Server Driver for JDBC and SQLJ
- IBM Data Server Driver for ODBC, CLI, and .NET (DSDRIVER)
A thin client, also known as a dumb terminal, is a machine with no operating system or DB2 client code. A thin client has to first get from another machine all the libraries and modules it requires to fulfill a request. Figure 1.11 shows an example of thin clients, where the thin client first requests, and then gets the libraries and modules it needs and the code of the DB2 client from the Data Server Client machine on the left side of the figure. This can only work on Windows platforms and will not work if the machine on the left side of the figure was an IBM Data Server Runtime client. It must be an IBM Data Server client.
Figure 1.11 A thin client
The IBM Data Server Runtime client has the minimum basic requirements to connect to DB2 databases and to provide basic client functionality. It includes the drivers for ODBC, CLI, .NET, PHP, Ruby, Perl-DB2, JDBC, and SQLJ. There are also IBM Data Server runtime client merge modules for Windows, which allow you to add IBM Data Server runtime client functionality to any product that uses the Windows installer. The IBM Data Server client comes with everything the IBM Data Server Runtime client has, plus graphical administration tools and development tools and libraries.
Prior to DB2 9, the drivers for ODBC, CLI, JDBC, and SQLJ could only be obtained by downloading and installing a DB2 client. With DB2 9, the IBM Data Server Driver for JDBC and SQLJ was introduced as a separate downloadable image. Now with DB2 9.5, the IBM Data Server Driver for ODBC, CLI and .NET (DSDRIVER) client is introduced to deploy drivers for applications to access remote IBM data servers. It includes support for PHP, Ruby, and Perl-DB2 as well. Both drivers are free and can be redistributed. Figure 1.12 illustrates the client progression.
Figure 1.12 Client progression