If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Simultaneously query different databases

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Oct 2003
Posts: 20
Question Simultaneously query different databases

Hopefully, the following questions are sensible:

Is it possible to use SQL to simultaneously query databases that are located in different places on the network?

Is it possible to create a "virtual table" or "temporary table" that consist of all the tables from the various databases that is needed in the query and then query "one table" instead of sequentially accessing each and every database?

For example, There are two separate databases that I query on a daily basis, an Oracle Database within the Hospital Contract Management Application and an Oracle Database within the Enterprise Warehouse.

Now, the password utilized to access each database is different.


Thanks in advance for insight!
Reply With Quote
  #2 (permalink)  
Old
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Re: Simultaneously query different databases

Since this is Oracle, the answer is to use a database link. Then you can refer to tables from various database in a single query like this:

select a.x, b.y, c.z
from a@db1, b@db2, c
where a.x = b.x
and b.y = c.y;

See this link for more details:

http://download-west.oracle.com/docs...6a.htm#2061507
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Oct 2003
Posts: 20
Post Creating Database Links!

Thank you.

I performed a cursory review of the Oracle website and the information regarding the creation of database links is quite interesting! I never knew that was possible but thought that I would pose the question.

I will further explore the creation of database links.

It appears that one could simultaneously query Access Databases and Oracle Databases.

What about Oracle Databases and non-relational tables within an Excel workbook?
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 7,598
>What about Oracle Databases and non-relational tables within an Excel >workbook?
It is just a Small Matter Of Programming (SMOP)!
Is "non-relational tables" an oxymoron?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On