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:
- Client. This refers to the initiator of the communications.
This role can be filled by any of the following DB2® products or components:
- IBM Data
Server Driver Package
- IBM Data
Server Client or IBM Data Server Runtime Client.
- DB2 Connect™ Personal Edition:
This product is a superset of the IBM Data
Server Client.
- a DB2 server product: A DB2 server is a superset of the Data Server
Client.
- Server. This refers to the receiver of the communications
request from the client. This role is normally filled by a DB2 for Linux, UNIX,
and Windows server product.
When DB2 Connect products
are present, the term server can also mean a DB2 server on a midrange or mainframe platform.
- Communications protocol. This refers to the protocol used
to send data between the client and server. The DB2 product supports several protocols:
- TCP/IP. A further distinction can be made between the version:
TCP/IPv4 or TCP/IPv6.
- Named Pipes. This option is available on Windows only.
- IPC (interprocess communications). This protocol is used for local
connections.
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 Configuration Assistant is a graphical tool provided with
versions of the Data Server
Client and DB2 server products on Windows and Linux on
Intel™ x86 32-bit platforms and AMD64/EM46T platforms. This tool is
not provided with the Data Server Runtime Client.
- The command line tools consist of the Command Line Processor (CLP),
and the commands db2cfexp (configuration export),
and db2cfimp (configuration import).
The second question is: What type of configuration task
do you want to perform? Options are:
- Configure a client by entering information manually.
- Configure a client by searching the network for servers to connect
to.
- Make databases on a server accessible to one or more clients.
- Use the connection settings for one client as the basis for configuring
additional clients.
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 |
- Create a client profile using the Configuration Assistant
- 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.