IBM Books

Quick Beginnings for DB2 Connect Enterprise Edition


Configuring NetBIOS on the Client

This section assumes that NetBIOS is functional on the client and DB2 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.

The following steps are required to set up a client to use NetBIOS communications:

  1. Identify and record parameter values.

  2. Configure the client:

    1. Record the network route for the Logical adapter number.

    2. Update the database manager configuration file.

    3. Catalog the NetBIOS node.

    4. Catalog the database.

  3. Test the connection between the client and server.

Step 1. Identify and Record Parameter Values

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 38. 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 DB2 Connect server to the node where the database resides. You can choose any name you want, however, all node name values within your local node directory must be unique.

db2node  

Step 2. Configure the Client

The following steps describe how to configure this protocol on the client. Replace the sample values with your worksheet values.

A. Record the Logical Adapter Number Used for the NetBIOS Connection

To view and record the logical adapter number (adapter_number) used for the NetBIOS connection, perform the following:

B. Update the Database Manager Configuration File

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:

  1. Log on to the system with a user account that belongs to the local Administrators group on each machine in your partitioned database system.

    note

    If you have trouble logging on to the system, see Logging on to the System.

  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
    

C. Catalog the NetBIOS Node

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:

  1. Log on to the system as a user with System Administrative (SYSADM) or System Controller (SYSCTRL) authority.

    note

    If you have trouble logging on to the system, see Logging on to the System.



    note

    If you are configuring communications for a Windows 3.x client, you can use the Client Setup tool to complete this task. Go to Using the Client Setup Tool to Configure a Windows 3.x Client to catalog a node using the Client Setup tool.

  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
    


note

If you need to change values that were set with the catalog node command, first run the uncatalog node command in the command line processor as follows:

   uncatalog node node_name

Recatalog the node with the value that you want to use.


D. Catalog the Database

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.

  1. Log on to the system as a user with System Administrative (SYSADM) or System Controller (SYSCTRL) authority.



    note

    If you have trouble logging on to the system, see Logging on to the System.

  2. Fill in the Your Value column in the following worksheet.

    Table 39. Worksheet: Parameter Values for Cataloging Databases
    Parameter Description Sample Value Your Value
    Database name (database_name) The database alias (database_alias) of the remote database. 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). sample  
    Database alias (database_alias) An arbitrary local nickname for the remote database, on the client. If you do not provide one, the default is the same as the database name (database_name). This is the name that you use when connecting to a database from a client. tor1  
    Node name (node_name) The name of the node directory entry that describes where the database resides. Use the same value for node name (node_name) that you used to catalog the node in the previous step. db2node  


    note

    If you are configuring communications for a Windows 3.x client, you can use the Client Setup tool to complete this task. Go to Using the Client Setup Tool to Configure a Windows 3.x Client to catalog a database using the Client Setup tool.

  3. Catalog the database by entering the following commands in the command line processor:
       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, use:
       catalog database sample as tor1 at node db2node
       terminate
    


    note

    If you need to change values that were set with the catalog database command, first run the uncatalog database command in the command line processor as follows:

       uncatalog database database_alias
    

    Recatalog the database with the value that you want to use.


Step 3. Test the Client-to-Server Connection

When the configuration of the server and client is complete, use the following steps to verify that you can access data from a remote database:

note

You will need to connect to a remote database to test the connection.

  1. Start the database manager by entering the db2start command on the server (if it was not automatically started at boot time).

  2. Enter the following command in the client's Command Center or command line processor 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. Authentication for connecting to host databases is set while configuring the DB2 Connect server. Refer to the DB2 Connect User's Guide for more information.

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"
   (for UNIX-based platforms)
   "select tabname from syscat.tables"
   (for other platforms)

When you are finished using the database connection, enter the connect reset command to end the database connection.

note

You are ready to start using the DB2 server. See Chapter 36. Getting Started with DB2 Universal Database for details.

Troubleshooting the Client-to-Server 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).


Figure hint not displayed.

If there are problems starting a protocol's connection managers, a warning message is displayed and the error messages are logged in the db2diag.log file.

Refer to the Troubleshooting Guide for information on the db2diag.log file.

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 logical adapter number (adapter_number)

  3. The node name (node_name), 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.

After you verify these items, refer to the Troubleshooting Guide if the connection still fails.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]