This is a discussion on How to execute queries that query different db at same time? within the Oracle Miscellaneous forums, part of the Oracle Database category; --> I have two sets of queries that query two different databases. I need to batch them together and execute ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have two sets of queries that query two different databases. I need to batch them together and execute them at same time. What is the best ay of doing this? Thanks in advance for any advice. Abby -- Posted via http://dbforums.com |
| |||
| Try creating a database link from one server (first) to another (second). Then run both queries on the first server. HTH, Brian abjiang wrote: > > I have two sets of queries that query two different databases. I need to > batch them together and execute them at same time. What is the best ay > of doing this? Thanks in advance for any advice. > > Abby > > -- > Posted via http://dbforums.com -- ================================================== ================= Brian Peasland dba@remove_spam.peasland.com Remove the "remove_spam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three" |
| |||
| abjiang wrote: > I have two sets of queries that query two different databases. I need to > batch them together and execute them at same time. What is the best ay > of doing this? Thanks in advance for any advice. > > Abby > > -- > Posted via http://dbforums.com Assuming you mean databases in the Oracle sense ... a database link and UNION ALL. If what you mean is two different schemas in a single database ... just UNION ALL. -- Daniel Morgan http://www.outreach.washington.edu/e...ad/oad_crs.asp damorgan@x.washington.edu (replace 'x' with a 'u' to reply) |
| |||
| 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 |
| |||
| 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@remote; Where remote is the name of the database link. -- Daniel Morgan http://www.outreach.washington.edu/e...ad/oad_crs.asp damorgan@x.washington.edu (replace 'x' with a 'u' to reply) |
| ||||
| abjiang <member35506@dbforums.com> wrote in message news:<3242307.1060974897@dbforums.com>... > 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 If you are willing to accept one script (versus one SQL script), then may I suggest programming this operation in PERL? (you can connect to multiple databases, merge/sort/manipulate the results, and output the answers to almost anyplace (files/displays/printer-plotters/networks/...) Or is the only tool you have a hammer(SQL)? Ed "when all you have is a hammer, everything looks like a nail" |
| Thread Tools | |
| Display Modes | |
|
|