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
- Issue the LIST DATABASE DIRECTORY command
to display the names of the databases that are defined in the database
directory for the federated server.
- Issue the LIST NODE DIRECTORY command
to display the contents of the node directory.
- Verify that the remote node names from step 1 are the valid
node entries in the node directory from step 2.
- 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.
- Catalog the database:
- 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.
-
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.
- Alter the server definition in the system catalog for the
federated database to register the database name:
- Check the SYSCAT.SERVERS catalog view for the name of
the server that you upgraded.
- 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.
- Verify that the upgrade was successful:
- Connect to the database.
- 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.