Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to execute queries that query different db at same time?
abjiang wrote:
> Thanks for the replies.
>
> I meant two different Oracle databases running on two different servers.
> So it is possible to put both query sets in a single .sql script and
> query both different Databases at the same time.....? How do I do a
> database link between two databases and what command should I use in the
> SQL script to open a remote DB connection?
>
> Thanks for any information you can provide with me!
>
> Abby
>
> --
> Posted via http://dbforums.com
It is not our place to do your job for you unless you are paying the rack rate. But we certainly can point you in the correct direction.
Go to http://tahiti.oracle.com and search on "DATABASE LINK".
Links are between databases and/or database schemas ... not tables.
Then your statement looks something like this:
SELECT *
FROM local_table
UNION ALL
SELECT *
FROM table_at_remote;
Where remote is the name of the database link.
-- Daniel Morgan http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Sat Aug 16 2003 - 19:30:18 CDT