IBM InfoSphere Federation Server, Version 9.7

Registering nicknames for DB2 tables and views

For each DB2® server definition, register a nickname for each table and view that you want to access. Then use the nicknames, not the names of the data source objects, when you query the DB2 database.

Before you begin

Before you register a nickname, use the DB2 RUNSTATS command to update the statistics at the DB2 data source. The federated server uses the data source statistics to optimize query processing.

About this task

To create a nickname, you specify a unique name and the name of your remote object, for example, a table or view. For DB2 Database for Linux®, UNIX®, and Windows® you can also specify the alias of a table, view, or nickname. For DB2 for z/OS or DB2 for i/OS, you can specify the alias of a table or view.

Restrictions

You cannot create a nickname on a DB2 database alias.

Procedure

To register a nickname:

Issue the CREATE NICKNAME statement.
For example:
CREATE NICKNAME nickname FOR server_definition_name."remote_schema"."remote.table"
When you create the nickname, the federated server queries the data source catalog using the nickname. This query tests the connection to the data source. If the connection does not work, an error message displays.


Feedback

Update icon Last updated: 2009-10-10