Registering server definitions for Db2 data sources

The federated server requires authorization and password information to connect to each Db2 server. Because this authorization and password information is not stored in the global catalog, you must include it in each server definition.

Procedure

To register a server definition, use :
Method Description
Use Administer/Remote Tables in DSM.

In the Nickname Explorer tab, click Create > Create a Remote Server. If no servers exist, you are taken to the Create Server tab.

Issue the CREATE SERVER statement for a database that is cataloged.
The HOST, PORT, and DBNAME options are required. AUTHORIZATION and PASSWORD are also required for Db2. The value that is specified for DBNAME is the remote database name. For example:
CREATE SERVER S1 TYPE db2/luw VERSION 11 WRAPPER DRDA
AUTHORIZATION "iidev29" PASSWORD "passw0rd"
OPTIONS (HOST 'devluw.ibm.com', PORT '50000', DBNAME 'clients')
After the server definition is registered, use the ALTER SERVER statement to add or drop server options.
Issue the CREATE SERVER statement for a database that is not cataloged.
The DBNAME, HOST, and PORT options are required. The value specified for DBNAME is the alias that will be assigned to the remote database. For example:
CREATE SERVER S1 TYPE db2/cs VERSION 10 WRAPPER DRDA
 AUTHORIZATION "iidev29" PASSWORD "passw0rd"
 OPTIONS (DBNAME 'clients', host '9.112.250.82', port '50681')
After the server definition is registered, use the ALTER SERVER statement to add or drop server options.
Note: For the VERSION, if you used Db2 for z/OS® Version 8 to create the database in compatibility mode, you must specify Version 7.

When you register the server, you can specify additional server options in the CREATE SERVER statement. These options include general server options and server options that are specific to the data source.

In Federation component , when you run the CREATE SERVER statement, the following server options are automatically configured based on the configuration of your data source:
  • DATE_COMPAT
  • NUMBER_COMPAT
  • SAME_DECFLT_ROUNDING
  • VARCHAR2_COMPAT
If you attempt to manually configure these server options, error message SQL1841N is issued.