Can we create a nickname for local databases?
For example:
SourceA and TargetB are two databases on same instance.
SourceA has a table x.EMP
ON TARGETB db...
1) Created a server
connect to TARGETb;
create server db_SOURCEA type db2/eee version 8.1
wrapper drda
authorization tester1
password "tester1"
options(dbname 'SOURCEA');
2) CREATE NICKNAME ON TARGETB
connect to TARGETb;
create nickname x.n_emp for db_sourcea.x.emp;
ERROR:
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned:
SQL1101N Remote database "sourcea" on node "" could not be accessed with the specified authorization id and password. SQLSTATE=08004
3)db2 list db directory
Database 8 entry:
Database alias = TARGETB
Database name = TARGETB
Local database directory = /targetb_db
Database release level = a.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database 9 entry:
Database alias = SOURCEA
Database name = SOURCEA
Local database directory = /sourcea_db
Database release level = a.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Please let me the command which will allow nickname to create successful.
Thanks
-R