This section assumes that Named Pipes is functional on the client and server workstations. See Software Requirements for the communication protocol requirements for your platform. See Possible Client-to-Server Connectivity Scenarios for the supported communication protocols for your particular client and server.
To set up a client to use Named Pipe communications, perform the following steps:
step 1. | Identify and record parameter values. |
step 2. | Configure the client:
|
step 3. | Test the connection between the client and server.
|
As you proceed through the configuration steps, complete the Your
Value column in the following table. You can fill in some of the
values before you start configuring this protocol.
Table 6. Named Pipe Values Required at the Client
Parameter | Description | Sample Value | Your Value |
---|---|---|---|
Computer name (computer_name) |
The computer name of the server machine. On the server machine, to locate the value for this parameter, click on
Start and select Settings->Control Panel.
Double-click on the Network folder and select the
Identification tab. Record the computer name.
| server1 | |
Instance name (instance_name)
|
The name of the instance on the server to which you are connecting.
| db2 | |
Node name (node_name) |
A local alias, or nickname, that describes the node to which you are trying
to connect. You can choose any name you want, however, all node name
values within your local node directory must be unique.
| db2node |
The following steps configure this protocol on the client. Replace the sample values with your worksheet values.
You must add an entry to the client's node directory to describe the remote node. This entry specifies the chosen alias (node_name), the server's Computer name (computer_name), and the Instance name (instance_name) that the client will use to access the remote server.
To catalog the Named Pipes node, perform the following steps:
step 1. | Log on to the system with a valid DB2 user ID. For more
information, see Appendix G. Naming Rules.
| ||
step 2. | Catalog the node by entering the following commands: catalog npipe node node_name remote computer_name instance instance_name terminate For example, to catalog a remote node called db2node, which is located on the server called server1, in the db2 instance, use: catalog npipe node db2node remote server1 instance db2 terminate
|
|
If you need to change values that were set with the catalog node command, perform the following steps:
|
Before a client application can access a remote database, the database must be cataloged on the server node and on any client nodes that will connect to it. When you create a database, it is automatically cataloged on the server with the database alias (database_alias) the same as the database name (database_name). The information in the database directory, along with the information in the node directory, is used on the client to establish a connection to the remote database.
To catalog a database on the client, perform the following steps:
step 1. | Log on to the system with a valid DB2 user ID. For more
information, see Appendix G. Naming Rules.
| ||||||||||||||||
step 2. | Fill in the Your Value column in the following
worksheet.
Table 7. Worksheet: Parameter Values for Cataloging Databases
| ||||||||||||||||
step 3. | Catalog the database by entering the following commands: catalog database database_name as database_alias at node node_name terminate For example, to catalog a remote database called sample so that it has the alias tor1, on the node db2node, enter the following commands: catalog database sample as tor1 at node db2node terminate
|
When you have finished configuring the client for communications,
perform the following steps to test the connection:
| You will need to connect to a remote database to test the connection. |
step 1. | Start the database manager by entering the db2start command on the server (if it was not automatically started at boot time). |
step 2. | Enter the following command to connect the client to the remote database: connect to database_alias user userid using password
|
| You are now ready to start using DB2. For more advanced topics, refer to the Administration Guide and the Installation and Configuration Supplement. |
If the connection fails, check the following items:
At the server:
__ 1. | The db2comm registry value includes the value
npipe.
| ||
__ 2. | The security service was started. Enter the net start db2ntsecserver command (for Windows NT servers only). | ||
__ 3. | The database was created and cataloged properly. | ||
__ 4. | The database manager was stopped and started again (enter the db2stop and db2start commands on the server).
|
|
If there are problems starting a protocol's connection managers, a warning message appears and the error messages are logged in the db2diag.log file. For more information on the db2diag.log file, refer to
the Troubleshooting Guide.
|
At the client:
__ 1. | The node was cataloged with the correct computer name (computer_name) and instance name (instance_name) of the server. |
__ 2. | The node name (node_name) that was specified in the database directory points to the correct entry in the node directory. |
__ 3. | The database was cataloged properly, using the server's database alias (database_alias) that was cataloged when the database was created on the server, as the database name (database_name) on the client.
|
If the connection still fails after you verify these items, refer to the Troubleshooting Guide.