Home > Articles > Data > DB2

  • Print
  • + Share This
This chapter is from the book

Configuring DB2 Clients

DB2 provides several different methods for configuring a remote client that needs to access a DB2 database server, as detailed in “Roadmap to Distributed Communications” on page 91. In this section, more details and examples of using these methods will be reviewed.

Automated Configuration Using Discovery

You can use the discovery function of DB2 to automate the addition of remote databases. This can be done in one of two ways:

  • Enter the name of the machine on the network (e.g., the hostname if using TCP/IP and then use discovery to automatically return the instances and databases on that machine (known discovery).

  • Search the network for machines, and then use discovery to automatically return the instances and databases on each machine (search discovery).

You can use either the Configuration Assistant or the Control Center to perform automated configuration. This is an example of using the CA to perform known discovery.

Known Discovery Using the Configuration Assistant (CA)

You can access the CA from the desktop or from the command line using the DB2CA command.

If no databases are yet cataloged on the client, the Welcome panel is displayed (Fig. 3-4). Otherwise, the databases that are cataloged on your client workstation are displayed under Available DB2 Databases in the main CA panel. To add another database, click on the Add button (or the Add Database button from the Welcome panel). The Add Database Wizard panel will appear to guide you through adding the new database.

03fig04.jpgFigure 3-4. Configuration Assistant (CA) - Add Database Using Wizard...

03fig05.jpgFigure 3-5. Select how you want to set up a connection

Select the Search the network radio button. Click on the Next button.

If the system is located, then it is displayed under Known Systems, together with all its instances and databases:

You can check if the database server is already known to the client by double clicking on the folder next to Known Systems in Fig. 3-6. If it is not, then click on the Add System button. If it is already known, then expand the system until you see the desired database, as in Fig. 3-8.

03fig06.jpgFigure 3-6. Select a database from the network search result

03fig07.jpgFigure 3-7. Select a database from the network search result - Expanded

03fig08.jpgFigure 3-8. Specify a nickname for the database

Select the database SAMPLE, then click on the Next button.

Choose an alias for the database and optionally add a comment. Click Next.

03fig09.jpgFigure 3-9. Register this database as a data source

You can register the database as an ODBC data source by checking the “Register this database for ODBC” check box. You can choose an application from the “Optimize for Application” selection box to optimize the ODBC settings for that application. Click Finish when done. You are now able to use the database you added.

03fig10.jpgFigure 3-10. Configuration Assistant - Test Connection

You can test the connection that has been added by selecting the database alias and clicking on Test Connection.

03fig11.jpgFigure 3-11. Test connection

You can select multiple ways to test the connection (i.e. CLI and ODBC), enter the user ID and password to be used when connecting to the remote database. On this panel you can also change the password for the user ID defined at the database server machine. If the connection is successful, you will see a pop-up message similar to this:

03fig12.jpgFigure 3-12. Test connection successful

Search Discovery Using the Configuration Assistant (CA)

Instead of entering the machine identifier (known discovery), you can use the CA to find databases on your local network (search discovery).

Start the Configuration Assistant (CA) and select Add Database Using Wizard.

Select the Search the network radio button. Click on the Next button.

As in the previous example using known discovery, you should first check in the Known Systems to make sure that the database server is not already known to the client.

If the system that contains the database you require is not listed, double click on the folder beside the “Other Systems (Search the network)” icon to search the network for additional systems. When the search is over, the list of discovered systems is displayed. Click on the [+] sign beside the system you require to get a list of the instances and databases defined there (Fig. 3-13). Select the database that you want to add and proceed as shown in the known discovery example.

03fig13.jpgFigure 3-13. Select a database from the network search result - Other Systems

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

Discovery only supports the TCP/IP protocol.

Using search discovery may appear to be simpler than known discovery. However, in larger networks, routers and bridges can filter the messages search discovery uses to find DB2 servers on the network. This may result in an incomplete or even empty list. In these cases, use known discovery.

Automated Configuration Using Access Profiles

Access profiles are another automated method to configure a DB2 client to access remote DB2 servers and their databases. An access profile contains the information that a client needs to catalog databases on a DB2 server.

As with discovery, when using access profiles, you do not need to provide any detailed communications information to enable the DB2 client to contact the DB2 server.

Two types of access profiles exist:

  • Client access profiles are used for duplicating the cataloged databases and/or the client settings (dbm cfg, CLI/ODBC) from one client to another.

  • Server access profiles are created from DB2 servers and contain information about all the instances and databases the DB2 server has cataloged.

Both types of profiles can be exported and then imported to another DB2 system using the Configuration Assistant. Use of access profiles is typical for configuring a large number of clients.

If you have a large number of clients to configure, you should also consider making use of LDAP (Lightweight Directory Access Protocol). This allows you to store catalog information in one centralized location. Each client just needs to know the centralized location to be able to connect to any database that has been made available in the network. See the DB2 UDB V8.1 Administration Guide for more details about LDAP.

In the Windows environment, DB2 supports Windows Active Directory as the LDAP Server and single sign-on using Kerberos security.

DB2 for OS/390 and DB2 for OS/400 do not support a searched discovery-based configuration. However, if you have a DB2 Connect server already configured with connections to either of these host servers, DB2 Discovery will search for your DB2 Connect server. You can then choose to connect through the DB2 Connect server or use its information to configure a direct connection to the host (if you have the appropriate DB2 Connect software installed on your local client machine).

Using Access Profiles

Access profiles are another automated method to configure a DB2 client to access remote DB2 servers and their databases. An access profile contains the information that a client needs to catalog databases on a DB2 server.

The generation of an access profile requires that the DISCOVER configuration parameter of the DAS service be set to either SEARCH or KNOWN. When the profile is generated, it includes all the instances that have ENABLE in the DISCOVER_INST database manager configuration parameter and all the databases that have the DISCOVER_DB database configuration parameter set to ENABLE. See “Configuring DB2 Discovery” on page 93 for more details about these settings.

The second part of the process is to import the server access profile to one or many client machines. To do this, the profile file must be made available to the DB2 client machine and then be imported using the Configuration Assistant.

The generated file is a text file and can be viewed but should not be changed.

Using the Configuration Assistant to Export a client profile

A client profile can be created by either the Configuration Assistant (CA) or by using the DB2CFEXP command. During the export process, the information necessary to create a connection between the client and server is created. The information in the client profile can then be imported to configure other clients.

Fig. 3-14 shows the Configuration Assistant, by clicking on Export Profile, the following options are given:

  • All - this will create a profile that contains all the databases cataloged on the system

  • Database connection information - this will create a profile that contains all of the databases cataloged on the system without any of the configuration information for this client

  • Customize - will allow you to select specific databases that are cataloged on the system

03fig14.jpgFigure 3-14. Configuration Assistant - Export Profile

For this example, select Customize

03fig15.jpgFigure 3-15. Customize Export Profile

Enter the name of the file where the information will be exported to, you can select specific parameters to be exported. If you click on DBM configuration parameters and then Customize, you will see the following screen:

03fig16.jpgFigure 3-16. DBM Configuration

The DBM Configuration panel allows the user to select a number of configuration parameters and change its value. Click OK to return and then click Export

03fig17.jpgFigure 3-17. Export Results

This final panel shows the results of the Export command. The generated file is a text file and can be viewed but should not be changed.

Using the Configuration Assistant to Import a client profile

A client access profile can be used to configure a client by using the import function of the Configuration Assistant (CA) or by using the DB2CFIMP command. Clients can import all or a subset of the configuration information from a given profile.

Start the Configuration Assistant, and click on Import.

03fig18.jpgFigure 3-18. Import Profile

By clicking on Import Profile, you are given the following options:

  • All - this will import all information from a given profile

  • Customize - this will allow you to select which parameters you want imported to your system.

03fig19.jpgFigure 3-19. Customize Import Profile

In this panel, select a file that contains the client information to import to this system and click Load. This will present you with the parameters found in the import file. You can choose which configuration parameters to import. Click Import.

03fig20.jpgFigure 3-20. Import Results

The status of the configuration parameters selected by Import are displayed.

Using the Configuration Assistant to Import a server profile

A server access profile is a file that contains information about all the instances on the DB2 server and all the databases within each instance.

Start the Configuration Assistant and select Add Database Using Wizard.

03fig21.jpgFigure 3-21. Select how you want to set up a connection

Select the Use a profile radio button and click Next.

03fig22.jpgFigure 3-22. Select a database from a profile

Select a server profile to load, click on Load, then select a database and click on Next.

03fig23.jpgFigure 3-23. Specify a nickname for the database

Enter a unique name for the database alias for the system. Click on Next.

03fig24.jpgFigure 3-24. Register this database as a data source

If the system will be using ODBC, register this database as an ODBC data source. Click Finish to exit.

Manual Configuration

It is also possible to manually configure a database connection. To manually configure the connection, you must know the following:

  • One of the protocols supported by the server instance containing the database

  • The protocol connection information required to configure the connection to the server instance

  • The server name

  • The name of the database on the remote server

There are two ways to manually configure connections:

  • Using the Manual option in the Configuration Assistant - in this case, you are prompted via a GUI interface for all the values to enter.

  • Using the CATALOG NODE/DB commands - in this case, you must know the syntax of the commands and enter the commands from a command line interface. The advantage of using the CATALOG NODE/DB commands is that the configuration steps can be put into scripts so that the configuration can be redone if necessary.

In either case, manual configuration must be used to exploit some advanced options that are not available using automated methods; for example, choosing the location where authentication should take place.

Manual configuration using the CA will now be reviewed. With the information listed above, the Add Database Wizard can be used to guide you through the steps necessary to add the database connection.

Manual Configuration Using the Configuration Assistant

Start the Configuration Assistant (CA) and click on Add in the CA's main panel to start the Add Database Wizard. Select Manually configure a connection to a DB2 database and click on Next.

03fig25.jpgFigure 3-25. Select a communications protocol

Select the protocol that you will use to connect to the database.

All of the protocols that DB2 supports are listed here, including APPC. If you have chosen APPC, your operating system choices are LAN-based, OS/390 or z/OS, OS/400, VM, or VSE. If you choose TCP/IP, your choices are LAN-based, OS/390, OS/400, or VM.

Click on Next.

03fig26.jpgFigure 3-26. Specify TCP/IP communication parameters

Enter the required protocol parameters. These parameters differ according to the protocol selected. These are the supported protocols together with their associated parameters:

  • TCP/IP - Server hostname/IP address, port number

  • NetBIOS - Server workstation name, adapter number

  • Named Pipe - Server computer name, instance

  • APPC - Server symbolic destination name

You should check that the machine is properly configured on the network before clicking on OK. For example, if using TCP/IP, ping the hostname to check if it is available.

Click on the Next button.

03fig27.jpgFigure 3-27. Specify the name of the database to which you want to connect

Enter the name of the database (as known at the server) in the Database Name field.

You can accept the same name as the local alias for the database or change the alias to a name of your choice. You can also enter a description.

On this panel (Figure 3-28) you can enter the ODBC settings.

03fig28.jpgFigure 3-28. Register this database as a data source

03fig29.jpgFigure 3-29. Specify the node options

This panel allows you to enter options relating to the remote node. You should fill in these values as they affect the behavior of the Control Center. The system and instance names are given by the values of DB2SYSTEM and DB2INSTANCE at the server. You should also select the operating system of the remote system.

03fig30.jpgFigure 3-30. Specify the system options

Enter system options relating to the database server, including system name, host name, and the operating system.

03fig31.jpgFigure 3-31. CA manual configuration - Enter security options

In the final panel, there are many options relating to security that may be specified.

You can specify whether authentication of the user takes place as specified in the server's database manager configuration file (the default), at the client, at the server, or by Kerberos. These options are explained in more detail in “Controlling Data Access” on page 135. You can also choose to use SOCKS security for TCP/IP connections, which allows you to access a remote database outside your firewall.

  • + Share This
  • 🔖 Save To Your Account

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020