IBM Books

Quick Beginnings for DB2 Extended Enterprise Edition for UNIX


Configuring Database Connections



note

To complete the steps in this section, you must be logged on to the local system as a user with System Administrative (SYSADM) authority on the instance.



note

You can configure database connections through the Add Database SmartGuide, by:

Each of these is covered in more detail in the material that follows.

Using an Access Profile

You can use either a Server profile or a Client profile to configure database connections on a client.

Server Profiles

Server profiles can be generated for a DB2 server. They contain information about instances on the server system, and databases within each instance. The information for each instance includes the protocol information required to set up a client to connect to databases in that instance.

To generate server profiles, use the Generate Access Profile function provided in the Control Center. When a profile is generated for a DB2 server system, it includes server instances that have the discover_inst configuration parameter and databases with the discover_db configuration parameter set to ENABLE. The discover parameter, for the Administration Server, must be set to either SEARCH or KNOWN to generate a profile for a server system.

For information on setting the discover_inst, discover_db and discover configuration parameters, see "Setting Discovery Parameters".

Generating a Server Profile

To generate an access profile, perform the following steps:

  1. Start the Control Center.

  2. Click on the [+] sign beside the Systems icon to get a list of systems.

  3. Select the system to be profiled and click on the right mouse button.

  4. Select the Generate access profile option.

  5. Select the path and type in a file name for the profile, then click on the Generate push button.

To process a server profile and add its databases to the client's connection configuration list, use the Client Configuration Assistant's Import or Add functions. Using the Add function is the preferred method.

Using a Server Profile on the Client

To add a database using the Add function:

  1. Start the Client Configuration Assistant (CCA).

  2. Click on the Add push button.

  3. Select the Use an Access Profile radio button, and click on the Next push button.

  4. Click on the Browse push button to select the server profile that you want to access, or enter the path and filename in the File field.

  5. Select a database to be added.

  6. If desired, you can select the Alias and ODBC tabs at the top of the panel to specify a database alias name for the database, or to select CLI/ODBC options for the database. This step is optional.

  7. Click on the Done push button.

  8. You can test the connection that has been added by clicking on the Test Connection push button.

Client Profiles

Information in Client profiles can be added to another client through the following:

Note:This scenario assumes that the database connections configured on one client will be exported and used to set up one or more additional clients.

Exporting a Client Profile

Client profiles are generated from clients using the Export function of the CCA. Use the export function to copy the database information used by one client to other clients.

The information contained in a client profile is determined during the export process. Depending on the settings chosen, it can contain the existing client's:

Export can be used to generate a customized profile that can be imported on another client to set it up initially, or to update it.

To export a profile from the client, configure the client for communications and do the following:

  1. Enter the db2cca admin command at a command prompt to start the Client Configuration Assistant in administrator mode. (You must be an administrator on the local system to perform this command.)

    note

    The Export function of the CCA is only available when the CCA is started in administrator mode. The CCA can be started permanently in administrator mode by modifying the Client Configuration Assistant icon to add the parameter admin to the startup of the CCA, or by issuing the db2cca admin command.

  2. Click on the Export push button.

  3. Select the databases to be exported from the Available DB2 Databases window, and add them to the Databases to be exported window.

  4. Select the check boxes that correspond to the options that you want to set up for the target client:

    To customize settings, click on the appropriate Customize push button. The settings that you customize will only affect the profile to be exported, no changes will be made to your workstation. For more information, click on the Help push button.

  5. Click on OK.

  6. Enter a path and file name for the Client profile.

Importing a Client Profile:


note

The Import function can be used to easily set up new client systems. The Import function works as follows:

Client Settings
Configuration parameters found in the export file replace existing ones on the client; all other parameters are set to default.

CLI/ODBC Common Parameters
Values found in the exported file replace those on the client.

Local Configuration Data for the APPC Communications Subsystem
If it is not already configured, this information is used to configure the APPC communications subsystem.

Perform these steps at the client that you want to set up. You can use this process to initially set up a new client, or to update an existing one.

  1. Start the Client Configuration Assistant (CCA).

  2. Click on the Import push button.

  3. Select the path and filename of the client profile you want to import and click on OK.

  4. The Import Client Profile window opens. Select the items you want to import. For more information, click on the Help push button.

  5. Click on OK.

    note

    If databases are contained in the client profile that you are importing, and you select to import them, the Add Database SmartGuide starts to allow you to selectively import the databases you want to connect to.

Searching the Network for Databases

Instead of entering protocol information to make a connection to remote database servers, you can use the CCA to find all the databases on your local network by following these steps:

note

The following scenario assumes that messages used by the Search method of discovery are not filtered by your network, and that the installation defaults on the client and the server have not been changed. In order to run the following scenario, you must ensure that the discover parameter in the database manager configuration file on the client, and the Administration Server configuration file on the server are set to Search.

  1. Start the Client Configuration Assistant (CCA).

  2. Click on the Add push button on the CCA's main panel to start the Add Database SmartGuide.

  3. Select the Search the network radio button, and click on the Next push button.

  4. Click on the [+] sign beside the Known Systems icon to list all the systems known to your client.

    1. Click on the [+] sign beside the system to get a list of the instances and databases on it. Select the database that you want to add and proceed to Step 5.

    2. If the system that contains the database that you want is not listed, click on the [+] sign beside the Other Systems (Search the network) icon to search the network for additional systems. Click on the [+] sign beside the system to get a list of the instances and databases on it. Select the database that you want to add and proceed to Step 5.

    3. If the system you want is still not listed, it can be added to the list of systems by clicking on the Add Systems push button.

  5. If desired, you can select the Alias and ODBC tabs at the top of the panel to specify a database alias name for the database, or to select CLI/ODBC options for the database. This step is optional.

  6. Click on the Done push button.

  7. You can test the connection that has been added by clicking on the Test Connection push button.

Searching the network can be customized to meet the needs of individual organizations. The material that follows provides details on this customization. Refer to the Administration Guide for more information on individual configuration parameters and profile registry values.

Choosing a Discovery Method

Network searching uses a DB2 facility called Discovery to obtain information from DB2 servers. This information is used to configure clients for database connections.
Note:Discovery cannot find information about pre-Version 5 DB2 systems.

Two discovery methods are available for searching the network:



Figure hint not displayed.

Search may appear to be a simpler discovery method. However, in larger networks, network routers and bridges can filter the messages search uses to find DB2 servers on the network, resulting in an incomplete or even empty list. In this case, use the Add System method; its messages are not filtered by routers and bridges. If in doubt, contact your network administrator for assistance.

To have the server support Known discovery, set the discover parameter in the Administration Server to KNOWN. To have it support Search discovery, set this parameter to SEARCH. To prevent discovery of the server, and all of its instances and databases, set discover to DISABLE.

On the client, enabling discovery is also done using the discover parameter; however, in this case, the discover parameter is set in the client instance (or a server acting as a client) as follows:

KNOWN
Allows the CCA to refresh systems in the known list, and to add new systems to the list by using the Add Systems button. When discover is set to KNOWN, the CCA will not be able to search the network.

SEARCH
Enables all the facilities of the KNOWN setting, and enables network searching.

DISABLE
Disables discovery. In this case, the Search the network option is not available in the Add Database SmartGuide.


note

Administration Servers configured with the discover parameter set to KNOWN will not respond to search requests from clients. It is important that you consider this when changing the discover parameter.

Additional Settings for SEARCH Discovery

Search discovery requires that the configuration parameter discover_comm be set on both the server (in the Administration Server's configuration file) and the client (in the database manager configuration file).

The discover_comm parameter is used to control the communication protocols that the server will listen on for search requests from clients, and that clients will use to send out search requests. The discover_comm parameter can be set to TCP/IP; this is the only protocol supported by SEARCH discovery.

On the Administration Server, the values specified for discover_comm must be equal to, or a subset of, the values set for db2comm.

note

To avoid problems with the Control Center and the Client Configuration Assistant, ensure that DB2COMM is set in the DB2 registry. It is not recommended that you use any other mechanism to set the DB2COMM value.

On the server, the discover_comm parameter is set in the Administration Server. On the client (or a server acting as a client), discover_comm is set in the instance.
Note:When using discovery search mode, at least one protocol specified by the discover_comm parameter on the client must match those specified by discover_comm on the Administration Server. If there is no match, the server will not respond to the client's requests.


Figure hint not displayed.

Check the settings for the db2comm registry value by issuing the db2set DB2COMM command. For more information, see Chapter 21. "Controlling Your DB2 Environment".

In addition, there are two DB2 profile registry values that can be used to tune search discovery on the client: db2discoverytime and db2nbdiscoverrcvbufs. The default values should be suitable in most cases. For more information, refer to the Administration Guide.

Hiding Server Instances and Databases from Discovery

You may have multiple instances, and multiple databases within these instances, on a server. You may want to hide some of these from the discovery process.

To allow clients to discover server instances on a system, set the discover_inst database manager configuration parameter in each server instance on the system to ENABLE (this is the default value). Set this parameter to DISABLE to hide this instance and its databases from discovery.

To allow a database to be discovered from a client, set the discover_db database configuration parameter to ENABLE (this is the default value). Set this parameter to DISABLE to hide the database from discovery.

Setting Discovery Parameters

discover and discover_comm
The discover and discover_comm parameters are set in the Administration Server on the server system, and in the client instance. Set these parameters as follows:

note

If the discover_comm includes NETBIOS, you must ensure that the Workstation name (nname) configuration parameter is set for the both the client and the Administration Server. Also, you must ensure that the db2nbadapters registry value is set to the Adapter number that you want to use. For more information, refer to the Administration Guide.

discover_inst and discover_db
Use the Control Center to set the discover_inst and discover_db parameters. To set these parameters, follow these steps:

  1. Start the Control Center.

  2. Select the instance that you want to configure and click on the right mouse button.

  3. Select the Configure option from the pop-up menu. The Configuration window opens.

  4. Select the Environment tab and select the discover_inst parameter.

  5. Enter the desired value in the Value box and click on OK.

  6. Select the database that you want to configure and click on the right mouse button.

  7. Select the Configure option from the pop-up menu. The Configuration window opens.

  8. Select the Environment tab and select the discover_db parameter.

  9. Enter the desired value in the Value box and click on OK.

db2discoverytime and db2nbdiscoverrcvbufs
The db2discoverytime and db2nbdiscoverrcvbufs profile registry values are set in the client instance (or a server acting as a client). Set these parameters as follows:

Manually Configure a Connection to a DB2 Database

Manually configuring a database connection requires you to know:

With this information, the SmartGuide will guide you through the steps necessary to add the database connection.

  1. Start the Client Configuration Assistant (CCA).

  2. Click on the Add push button on the CCA's main panel to start the Add Database SmartGuide.

  3. Select the Manually configure a connection to a DB2 database radio button, and click on the Next push button.

  4. Select the protocol that you will use to connect to the database. Click on the Next push button.

  5. Type in the required protocol parameters. Click on the Next push button.

  6. Type in the name of the database in the Target database field.

  7. If desired, you can select the Alias and ODBC tabs at the top of the panel to specify a database alias name for the database, or to select CLI/ODBC options for the database. This step is optional.

  8. Click on the Done push button.

  9. You can test the connection that has been added by clicking on the Test Connection push button.


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

[ DB2 List of Books | Search the DB2 Books ]