Accessing Db2 family data sources after upgrading a federated server

When you upgrade a federated server, you might need to configure the federated server to access Db2 family data sources. If you upgraded only databases and did not upgrade the instances, you must complete the following procedure to access Db2 family data sources.

Before you begin

Obtain the server names and the database alias names for the databases that you accessed before you upgraded your federated server.

Although the DRDA wrapper ignores the NODE option, a node entry must be cataloged in the node directory to catalog remote databases in the database directory.

About this task

To access Db2 family data sources after you upgrade a federated server:

Procedure

  1. Issue the LIST DATABASE DIRECTORY command to display the names of the databases that are defined in the database directory for the federated server.
  2. Issue the LIST NODE DIRECTORY command to display the contents of the node directory.
  3. Verify that the remote node names from step 1 are the valid node entries in the node directory from step 2.
  4. If you upgraded only the database, issue the CATALOG TCPIP NODE command.
    This command adds the TCP/IP node entry to the node directory so that you can access the remote node. For example:
    CATALOG TCPIP NODE NODENAME1 REMOTE hostname SERVER servicename
    NODENAME1 is the name of the remote node. hostname is the host name where the target database resides. servicename is the service name or port number of the database manager instance for the server.
  5. Catalog the database:
    1. Issue the CATALOG DATABASE command to catalog and store remote database information in the directory for the federated system database.
      For example:
      CATALOG DATABASE DB_NAME AS ALIAS1 
      AT NODE NODENAME1
      DB_NAME is the name of the remote database that you are cataloging in the database directory for the federated server system. ALIAS1 is the alias for the database that you are cataloging. NODENAME1 is the name of the node where this remote database resides.
      The name of the node that you specify must match the node name that you added in the CATALOG TCPIP NODE command.
    2. If the remote database name is longer than eight characters, issue the CATALOG DCS DATABASE command. This command creates a DCS directory entry.
      For example:
      CATALOG DCS DATABASE ALIAS1 AS DB2_DATABASE_NAME

      The name of the alias, ALIAS1 in this example, must match the name of the database alias that you are cataloging. DB2_DATABASE_NAME is the name of the target host database.

      Database names for Db2 for z/OS® and Db2 for IBM® i data sources are typically longer than eight characters.
  6. Alter the server definition in the system catalog for the federated database to register the database name:
    1. Check the SYSCAT.SERVERS catalog view for the name of the server that you upgraded.
    2. Issue the ALTER SERVER statement.
      For example:
      ALTER SERVER alias_server_name OPTIONS 
      (SET DBNAME 'ALIAS1') 
      alias_server_name is the alias for the remote server in the catalog view. ALIAS1 is the alias for the database that you cataloged.
  7. Verify that the upgrade was successful:
    1. Connect to the database.
    2. Issue SELECT, INSERT, UPDATE, and DELETE statements on the nicknames to verify that you can view and modify the data.
      You can also open a pass-through session to the remote database and issue a SELECT statement on a remote table.