This section assumes that NetBIOS 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 NetBIOS 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 11. NetBIOS Values Required at the Client
Parameter | Description | Sample Value | Your Value |
---|---|---|---|
Logical adapter number (adapter_number) |
The local logical adapters that will be used for the NetBIOS
connection.
| 0 | |
Workstation name (nname) - on the client | The NetBIOS name of the client workstation.
nname is chosen by the user and must be unique among all NetBIOS nodes in the network. | client1 | |
Workstation name (nname) - on the server |
The NetBIOS name of the server workstation. Locate this parameter in the database manager configuration file on the
server.
| server1 | |
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.
To view and record the logical adapter number (adapter_number) used for the NetBIOS connection, perform the following steps:
step 1. | Double-click on the MPTS icon. |
step 2. | Click on the Configure push button. |
step 3. | Select the LAN adapters and protocols radio button and click on the Configure push button. |
step 4. | Record the Logical adapter number associated with the IBM OS/2 NETBIOS entry in the Current Configuration window. |
step 5. | Click on the Cancel push button. |
step 6. | Click on the Close push button. |
step 7. | Click on the Exit push button.
|
|
There is no interface on Windows 9x operating systems that you can use to
record the adapter number used for the NetBIOS connection. Complete the
following steps to have the NetBIOS protocol default to use the adapter number
0.
|
step 1. | Click on Start and select Settings->Control Panel. |
step 2. | Double-click on the Network icon. |
step 3. | Select the NetBEUI icon from the following Network components are installed window. |
step 4. | Click on the Properties push button. |
step 5. | Select the Advanced tab. |
step 6. | Select the Set this protocol to be the default check box. |
step 7. | Click on OK to exit this window. |
step 8. | Click on OK. |
step 9. | Record the value 0 as the logical adapter number on your worksheet. |
step 10. | Shut down and reboot your system for these changes to take effect.
|
|
The logical adapter number (adapter_number) that you use
must be associated with the Nbf Network Route for native
NetBIOS.
|
You must update the database manager configuration file with the client's workstation name (nname) parameter.
To update the database manager configuration file, perform the following steps:
step 1. | Log on to the system as a user with System Administrative (SYSADM) authority. For more information, see Working with the System Administrative Group. |
step 2. | Update the database manager configuration file with the client's Workstation name (nname) parameter using the following commands in the command line processor: update database manager configuration using nname nname terminate For example, if the client's workstation name (nname) is client1, use: update database manager configuration using nname client1 terminate
|
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 remote server's workstation name (nname), and the Logical adapter number (adapter_number) that the client will use to access the remote DB2 server.
To catalog the NetBIOS 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 in the command line processor: catalog netbios node node_name remote nname adapter adapter_number terminate For example, to catalog a remote database server server1 on the node called db2node, using the logical adapter number 0, use: catalog netbios node db2node remote server1 adapter 0 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 12. 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
|
The values for userid and password must be valid for the system on which they are authenticated. By default, authentication takes place on the server for a DB2 server and on the host or AS/400 machine for a DB2 Connect server.
If the connection is successful, you will get a message showing the name of the database to which you have connected. You are now able to retrieve data from that database. For example, to retrieve a list of all the table names listed in the system catalog table, enter the following SQL command in the Command Center or command line processor:
"select tabname from syscat.tables"
When you are finished using the database connection, enter the connect reset command to end the database connection.
If the connection fails, check the following items:
At the server:
__ 1. | The db2comm registry value includes the value
netbios.
| ||
__ 2. | The logical adapter number is equal to 0 (or the DB2NBADAPTERS registry value was updated to override the default value). | ||
__ 3. | The server's workstation name (nname) parameter was updated correctly in the database manager configuration file (or the admin configuration file, if you are setting up the Administration Server). | ||
__ 4. | The network route associated with the logical adapter number is Nbf (for Windows NT servers only). | ||
__ 5. | The security service was started. Enter the net start db2ntsecserver command (for Windows NT servers only). | ||
__ 6. | The database was created and cataloged properly. | ||
__ 7. | 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 client's workstation name (nname) parameter was updated correctly in the database manager configuration file. |
__ 2. | The node was cataloged with the correct server's workstation name (nname) and local logical adapter number (adapter_number). |
__ 3. | The node name (node_name) that was specified in the database directory points to the correct entry in the node directory. |
__ 4. | 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.