Solved

How do we join 2 DB2 databases within the same instance.

Posted on 2008-10-20
2
334 Views
Last Modified: 2012-05-05
We have a need to join tables across two DB2 databases in the same instance.  Is a federated system our only option?  How do we set it up ... both databases are in the same instance. Are there performance implications?
0
Comment
Question by:ausrs
2 Comments
 
LVL 37

Accepted Solution

by:
momi_sabag earned 125 total points
ID: 22764527
if the two databases are in the same instance you don't need federated systems
you just add the database name as a prefix for your object, for example, if you have table schema1.table1 in db1 and table schema2.table2 in db2 you perform

select *
from db1.schema1.table1 inner join db2.schema2.table2 on ....
0
 

Author Comment

by:ausrs
ID: 22956910
Thanks ... I understand this works for DBMSs other than DB2.  In DB2 you must set up a nickname to the remote database, even if it is in the same instance and then you can perform the joins.  I was hoping this was not the case because I underatnd that performance may be impacted with federated systems.  
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating and Managing Databases with phpMyAdmin in cPanel.
Read about achieving the basic levels of HRIS security in the workplace.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question