Question & Answer
Question
You can use DB2s Federated capability to create a nickname to another DB2 UDB Database, even one in the same instance. The Control Center makes this easy, but the CREATE NICKNAME may fail with SQL1101.
Cause
When running the Control Center directly from the database server, an implicit connection is made to the Database you are working with. You are already logged on to the database server, so no additional authentication is required, and you are not prompted for an ID and Password. This can be a problem because the CREATE NICKNAME requires an ID and Password.
Answer
You need to explicitly connect to the Federated database first. This is because CREATE NICKNAME will connect to the target DB, and this connect requires an ID and a Password. If you implicitly connected to the Federated DB, then DB2 does not have a password for the subsequent Connect
An explicit connection means that you provided an ID and Password, for example:
db2 connect to sample user db2inst1
.while an implicit connection looks like this:
db2 connect to sample
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21509968