Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / March 2004

Tip: Looking for answers? Try searching our database.

how to use sql to query from different database.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
xixi - 08 Mar 2004 23:22 GMT
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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.