![]() |
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.
|
![]() |
You can configure database connections through the Add Database SmartGuide, by:
|
You can use either a Server profile or a Client profile to configure database connections on a client.
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 in the Administration Server's configuration file 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.
To generate an access profile, perform the following steps:
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.
To add a database using the Add function:
Information in client profiles can be added to another client using the:
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. |
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:
The Export function can be used to generate a customized profile that can be imported on another client to set it up, or update it.
To export a profile from the client, configure the client for communications and do the following:
![]() |
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. To add the parameter admin to the CCA startup:
|
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.
Perform these steps at the client that you want to set up.
![]() | 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. |
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:
![]() |
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. To run the following scenario, you must ensure that the
discover parameter in the database manager configuration file on the
client, and the discover parameter in the Administration Server
configuration file on the server are set to SEARCH. Also, the
discover_comm parameter must be set to the search protocols used on
the client and Administration Server.
|
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.
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 retrieve information about pre-Version 5 DB2 systems. |
Two discovery methods are available for searching the network:
Known discovery allows you to discover instances and databases on systems that are known to your client, and add new systems so that their instances and databases can be discovered.
Initially, the list of systems will be blank; however, if you are running the CCA on the server, an entry for the local server will be shown. Add systems to the list by clicking on the Add System push button. To use this option you must know a few details about the Administration Server on the DB2 system to be searched:
The Administration Server will listen for Known discovery requests, from clients, on the protocols specified by the db2comm registry value in the Administration Server.
This mode provides all of the facilities of Known discovery, and adds the
option to allow your local network to be searched for DB2 servers.
![]() |
The TCP/IP host name returned to a client by Search discovery is the
same host name that is returned by your DB2 server system when you enter the
hostname command. On the client, the IP address that this
host name maps to is determined by either the TCP/IP domain name server
(DNS) configured on your client machine or, if a DNS is not configured, a
mapping entry in the client's hosts file. If you have
multiple adapter cards configured on your DB2 server system, you must ensure
that TCP/IP is configured on the server to return the correct hostname,
and that the DNS or local client's hosts file, maps the
hostname to the IP address desired.
|
Search may appear to be a simpler discovery method. However, in larger networks, network routers and bridges can filter the messages that 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 configuration file to KNOWN. To have it support Search discovery, set this parameter to SEARCH (which also supports all the facilities of Known discovery). To prevent discovery of a 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:
![]() |
The discover parameter defaults to SEARCH on all client
and server instances. The discover parameter defaults to
SEARCH on all Administration Servers except Administration Servers
installed in a UNIX Extended Enterprise Edition environment, where
discover defaults to KNOWN.
|
Search discovery requires that the discover_comm parameter 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 to for search requests from clients, and that clients will use to send out search requests. The discover_comm parameter can be any combination of TCP/IP and NetBIOS; the protocols 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.
![]() |
To avoid problems with the Control Center and the Client Configuration
Assistant, ensure that the DB2COMM parameter is set in the DB2
registry using the db2set command. 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's configuration file. On the client (or a server acting as a client), discover_comm is set in the database manager configuration file.
Note: | When using Search discovery, at least one protocol specified by the discover_comm parameter on the client must match those specified by the discover_comm parameter on the Administration Server. If there is no match, the server will not respond to the client's requests. |
![]() |
Check the settings for the db2comm registry value by entering the
db2set DB2COMM command. For more information, see Chapter 15. Controlling Your DB2 Environment.
|
In addition, there are two DB2 profile registry values that can be used to tune Search discovery via NetBIOS on the client: db2discoverytime and db2nbdiscoverrcvbufs. The default values should be suitable in most cases. For more information, refer to the Administration Guide.
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.
Update the Administration Server's configuration file, in the command processor, as follows:
update admin cfg using discover [ DISABLE | KNOWN | SEARCH ] update admin cfg using discover_comm [ TCPIP ]
Stop and restart the Administration Server by entering the following commands:
db2admin stop db2admin start
Note: | Search Discovery will only operate on TCP/IP. |
db2set db2discoverytime=60
This specifies that Search discovery should wait 60 seconds for a response from servers.
db2set db2nbdiscoverrcvbufs=20
This specifies the number of NetBIOS buffers that will be allocated for concurrent response messages from discovered servers.
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.
![]() |
When a database is created on the remote server, if a database alias is not
specified during database creation, the database is created with a database
alias=database_name; otherwise, the database alias is the name
specified.
|
![]() |
When you add a database using this configuration method, the Client Configuration Assistant will generate a default node name for the database. For example, if you used TCP/IP to add the database to your system, the
instance name could be TCP0000.
|