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
About this task
Restrictions
You cannot create a nickname on a Db2 database alias.
Procedure
To register a nickname, use one of the following methods:
Method | Description |
---|---|
Use the Administration Explorer in IBM Data Studio. | In the Federated Database Objects folder, right-click the Nicknames folder, and select Create Nickname. |
Issue the CREATE NICKNAME statement. | For example:
|
When you create the nickname, the federated server queries the data source catalog by using the nickname. This query tests the connection to the data source table or view. If the connection does not work, you receive an error message.