hi, we are using db2 udb v8.1, i would like to know is there a way by
using sql to query two different tables which exists on two different
database on the same server. thanks
Aakash Bordia - 08 Mar 2004 23:54 GMT
Please look at the Federated Systems Guide for further reference.
Thanks
Aakash
> hi, we are using db2 udb v8.1, i would like to know is there a way by
> using sql to query two different tables which exists on two different
> database on the same server. thanks
PM \(pm3iinc-nospam\) - 09 Mar 2004 04:22 GMT
As a second option, if you don't need to select from both tables/databases
at the same time,
you can simply use a type 2 connect.
PM
> hi, we are using db2 udb v8.1, i would like to know is there a way by
> using sql to query two different tables which exists on two different
> database on the same server. thanks
xixi - 09 Mar 2004 17:46 GMT
yes , i need to select from both table in different database at the
same time. please advice
Sean McKeough - 09 Mar 2004 19:22 GMT
As PM said, you can use a type 2 connection (connection attribute setting).
> yes , i need to select from both table in different database at the
> same time. please advice
PM \(pm3iinc-nospam\) - 10 Mar 2004 05:32 GMT
I think you can use this as a preliminary list of things to do to get what
you want.
Use the control center/gui and goto the fed objects.
Enable fed feature ; dbm cfg
You may also investigate the use of fed_noauth witch.
Create the db2 wrapper
Create the server
potentially create user mappings.
Create the nicknames.
Do your sql.
PM
Serge Rielau - 09 Mar 2004 14:24 GMT
Check out Nicknames. you will need: UPDATE DBM CFG USING FEDERATED YES
as a prereq.
Cheers
Serge

Signature
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab