I need a solution for below:
There are Two DB2 instances with two authorization ID on the same server and can be access using same user User1.
To access Inst1DB, I use the following commands: [User1 ~]$ . /db2/authID1db2/home/authID1db2/sqllib/db2profile [User1 ~]$ db2 connect to Inst1DB
To access Inst2DB, run the following commands: [User1 ~]$ . /db2/auth2db2/home/auth2db2/sqllib/db2profile [User1 ~]$ db2 connect to Inst2DB
Note one need to terminate the current DB2 session before connecting to another DB instance. To terminate DB session, run the following command: [User1 ~]$ db2 terminate
I want to perform below join operational on the tables, in which one table belongs to INST1DB and other to INST2DB while connected to INST1DB.
[User1 ~]$ . /db2/authID1db2/home/authID1db2/sqllib/db2profile [User1 ~]$ db2 connect to Inst1DB [User1 ~]$ db2 "Select * from Inst1DB.schema1.table1 T1 , Inst2DB.schema2.table2 T2 where T1.column1 = T2.column1.
Curerntly I am getting below error:
SQL0204N "Inst2DB.schema2.table2" is an undefined name. SQLSTATE=42704.
Can anyone suggest me how to connect the two instances and and perform join on tables.