Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


cross database query

cross database query

cross database query

Is it possible to join tables in more than one database, within the same instance, in a query (DB2 8.1, on Windows 2000)? e.g.

select * from db1.u1.tab1 inner join db4.u2.tab6 on ...

I'm sure it worked on DB2 on a mainframe (when I used to work on proper machines!)

RE: cross database query

This is possible ...

This is called Federated System in the DB2 LUW world ... (Don't know what it was called on the mainframe)

A brief of the steps :

1) Ensure that the data joiner package is installed ( This is on Unix .. not sure how to do it on W2K)

2) Set the dbm cfg parameter FEDERATED=YES and restart the instance

3) Create Wrapper (This step identifies the library to use to connect to a remote database). In your case the library will be drda.dll

4) Create Server. This step identifies the node and database to use.

5) Create a Nickname to a remote table ...

You may also need to create a user mapping (can't remember)

In the DB2's information centre read 'Federated Systems' under the concepts heading ...


More DB2 questions answered at www.dbforums.com/f8

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close