Configuring access to Db2 data sources

To configure a federated server to access Db2 family data sources, you must provide the federated server with information about the data sources and objects that you want to access.

Before you begin

  • Verify the set up of the federated server.

Procedure

  1. Configure remote Db2 data source information.
    Note: See this section for the methods to configure the remote Db2 data sources or skip this step and provide related information when registering server definitions.
  2. Register the Db2 wrapper.
  3. Register the server definitions for a Db2 data source.
  4. Create the user mappings for a Db2 data source.
  5. Test the connection to the Db2 data source server.
  6. Register the nicknames for the Db2 tables and views.

Example

See the tech note, How to use the federation capabilities of Db2 to query data in a remote Db2, Db2 iSeries (AS/400), or Db2 for z/OS data source. It contains sample code that illustrates the following tasks:
  • Creating a connection to a remote data source.
  • Cataloging a remote data source.
  • Configuring the IBM data server driver configuration file, db2dsdriver.cfg.
  • Creating a wrapper, server, user mapping, and nickname for a remote data source.