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
CREATE NICKNAME nickname FOR server_definition_name."remote_schema"."remote.table"