Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» Sitemap
Free Newsletters:
DatabaseDaily  
News Via RSS Feed


follow us on Twitter
Database Journal |DBA Support |SQLCourse |SQLCourse2
 

Featured Database Articles

DB2

Posted Apr 1, 2008

Understanding DB2: Learning Visually with Examples - Page 5

By DatabaseJournal.com Staff

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


Note - The DB2 9 Runtime Client has been renamed IBM Data Server Runtime Client starting in DB2 9.5. The DB2 9 Client has been renamed IBM Data Server Client starting in DB2 9.5. These name changes reflect changes in the client code, as these clients not only can connect to DB2 data servers, but can also connect to Informix data servers.


1.5 Try-and-Buy Versions

A DB2 9.5 Try-and-Buy version allows you to try DB2 for an evaluation period of 90 days. DB2 will stop working after the 90 days unless you buy and apply the full license. Other than this time limitation, the Try-and-Buy version contains all the features of a fully licensed version. During or after the Try-and-Buy period you can buy a permanent license by calling 1-800-IBM-SERV. An IBM representative will direct you to the License Key Center. Once you receive the license file, you can use it to upgrade the Try-and-Buy version to the fully licensed product level without reinstalling it. Use the following command from a command-line window to install the license file:

db2licm -a filename

where file_name stands for the name of the license file, which normally has a .lic extension.

Issuing the db2licm -l command lists the software products installed on your machine and the current license. After adding a full license, the Expiry Date field will have a value of Permanent. Chapter 3, Installing DB2, discusses more about the db2licm command and the License Center. 


Note - Licensing policies, as well as the evaluation period, are subject to change. The information in this section is accurate as of the time of publication.


1.6 Host Connectivity

DB2 Connect is a software product containing the license files required to communicate from a DB2 distributed client, also known as the DRDA Application Requester, to a host DB2 server, a DRDA Application Server. (DRDA—Distributed Relational Database Architecture—is the standard that defines formats and protocols for providing transparent access to remote data.) Host DB2 servers include DB2 for z/OS and OS/390, DB2 for VM/VSE, and DB2 for i5/OS. DB2 Connect also includes an IBM Data Server Runtime client.


Note - DB2 Connect software is only required when connecting from DB2 LUW to a host DB2 server, such as DB2 for z/OS; it is not required in the other direction, for example, when DB2 for z/OS behaves as the client, and DB2 LUW is the server.


DB2 Connect comes in two main editions. Other editions not listed below refer to licensing options:

  • The Personal Edition supports the direct connection of one DB2 client to multiple host DB2 servers.

  • The Enterprise Edition supports the connection of multiple DB2 clients to multiple host DB2 servers via a DB2 Connect server.

1.7 Federation Support

Federation allows you to query and manipulate data stored on other servers and in other data servers. When you issue an SQL statement in a federated environment, you may actually be accessing information from multiple databases and potentially multiple data servers (see Figure 1.13).

Figure 1.13
DB2 federation

Federated support is included in DB2 when the other databases being accessed are part of the IBM DB2 family, that is, another DB2 database or an Informix database. For accessing databases from other vendors, refer to the IBM WebSphere Federation Server product described in Section 1.9.

1.8 Replication Support

Replication lets you propagate data to different servers to keep multiple databases synchronized. This can be useful in situations where a single server is used for day-to-day transaction operations, and where issuing reporting queries at the same time would be costly for performance. By replicating the data to another server, this second server could be used for reporting without disturbing the first server. Figure 1.14 illustrates how the data changes captured at one server are later applied to another (target) server. In the figure, the first box shows the source server and the fourth box shows the target server. The second and third boxes contain the "capture" and "apply" components, respectively.

Figure 1.14
DB2 replication environment

DB2 has built-in support for replication when source and target databases are part of the IBM family, which includes Informix. For databases from other vendors, such as Oracle or SQL Server, the IBM WebSphere Replication Server software is required.



DB2 Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.