DB2 Version 9.7 for Linux, UNIX, and Windows

Client-to-server communications configuration overview

This topic provides information for choosing a suitable method for configuring client-to-server communications. This topic applies to configuring IBM® data server client and server products rather than to database connectivity drivers.

Understanding client-to-server communications: Components and scenarios

The basic components involved in client-to-server communications are described below:

There are also some additional components encountered in some environments:
  • DB2 Connect gateway. This refers to a DB2 Connect server product that provides a gateway by which IBM data server client can connect to DB2 servers on midrange and mainframe products.
  • LDAP (Lightweight Directory Access Protocol). In an LDAP-enabled environment, it is not necessary to configure client-to-server communications. When a client attempts to connect to a database, if the database does not exist in the database directory on the local machine then the LDAP directory is searched for information required to connect to the database.
The scenarios listed below illustrate examples of situations covered by client-to-server communications:
  • Data Server Client establishes communications with a DB2 server using TCP/IP.
  • Data Server Runtime Client establishes communications with a DB2 server using Named Pipes on a Windows network.
  • DB2 server establishes communications with another DB2 server via some communications protocol.
  • Data Server Client establishes communications with a mainframe DB2 server via a DB2 Connect server using TCP/IP.

When setting up a server to work with development environments (such as IBM Data Studio), you might encounter error message SQL30081N at the initial DB2 connection. A possible root cause is that the firewall at the remote database server has prevented the connection from being established. In this case, verify the firewall is properly configured to accept connection requests from the client.

Understanding client-to-server communications: Types of connections

Generally speaking, references to setting up client-to-server communications refer to remote connections, rather than local connections.

A local connection is a connection between a database manager instance and a database managed by that instance. In other words, the CONNECT statement is issued from the database manager instance to itself. Local connections are distinctive because no communications setup is required and IPC (interprocess communications) is used.

A remote connection is one where the client issuing the CONNECT statement to a database is in a different location from the database server. Commonly, the client and server are on different machines. However, remote connections are possible within the same machine if the client and server are in different instances.

Another less common type of connection is a loopback connection. This is a type of remote connection where the connection is configured from a DB2 instance (the client) to the same DB2 instance (the server).

Comparison of methods for configuring client-to-server communications

Several methods are available for configuring client-to-server communications. Choosing a suitable method involves answering two questions. The first is Which tool will you use: Configuration Assistant or command line tools?

The second question is: What type of configuration task do you want to perform? Options are:

With answers to these questions, you can use the table below to identify the appropriate configuration method. Links to each method are provided at the end of this topic. Notes follow the table that provide more details.

Table 1. Tools and methods for configuring a client-to-server connection
Type of configuration task Configuration Assistant Command line
Configure a client by entering information manually Configure a database connection manually with the Configuration Assistant Configure client-to-server connections using the command line processor
Configure a client by searching the network for servers to connect to Configure a database connection by searching the network with the Configuration Assistant Not applicable
Use the connection settings for one client as the basis for configuring additional clients
  1. Create a client profile using the Configuration Assistant
  2. Configure database connections using a client profile with the Configuration Assistant
create and use a client profile using commands db2cfexp and db2cfimp
Note: Profiles are used in some methods for configuring client-to-server communications. A client profile is a file that contains settings for a client. Settings can include:
  • Database connection information (including CLI or ODBC settings).
  • Client settings (including database manager configuration parameters and DB2 registry variables).
  • CLI or ODBC common parameters.
A server profile is similar to a client profile but contains settings for a server. Profiles can be created and used with the Configuration Assistant or by using the commands db2cfexp (configuration export), and db2cfimp (configuration import).
Note: Configuring a database connection by searching the network with the Configuration Assistant is not a recommended method for DB2 Connect customers connecting to databases on midrange or mainframe platforms.