Query from different database Connections Oracle SQL develoepr?
-
Is it possible to write a query over two different database connections (both are oracle databases - they have different sign on credentials etc) I'm trying to join sales data on a server in the UK to product data on a server in France. Can I do this using standard SQL - what does it look like? I'm familiar with using different user name spaces within one connection (e.g. MIData and MI_dataStore) to different tables but not using entirely different connections... Thanks
-
Answer:
This would be dependent on your programming language - typically you create a connection object or something similar for each database the app is to connect to...while I'm sure there's an upper limit as to how many connections can be live at a given time (which likewise would depend on the platform), I'm sure just about all can handle 2 simultaneous connections just fine.
Leon S at Yahoo! Answers Visit the source
Other answers
I think the best approach is to use database links (dblinks) from one of your databases to the other. For example, in the UK database, define a "dblink" to the one in France. You can then write your SQL just like a regular join, except that "remote" tables (the ones in the France db) are going to be sufixed with "@dblink_name". The query optimizer will distribute the table access process to the proper databases. For example if your join includes two tables in the remote database, there is a good chance that the optimizer will push this join to be executed on the remote database.
Related Q & A:
- How to handle database connections?Best solution by Stack Overflow
- How can I optimize this dynamic SQL query in oracle with PL/SQL?Best solution by docs.oracle.com
- How to convert sql query to Hibernate Criteria query?Best solution by Stack Overflow
- How to convert my SQL query to MS Access query?Best solution by Stack Overflow
- How to enable remote connections in SQL Server 2008?Best solution by Server Fault
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.