IBM Support

SQL1101 when creating nickname to DB2 Database

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

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Database Objects\/Config - Database","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"9.7;9.5;9.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21509968