One to Many [message #636618] |
Wed, 29 April 2015 04:26 |
|
vaibhav15211
Messages: 38 Registered: August 2012 Location: Hyderabad
|
Member |
|
|
Hello,
Our client has different database for different countries. Say if there are three countries than three databases, which interface the GL data with Oracle system.
There is a view that picks the data from client servers using DB Links. Till now there was only one country and one server, now there are two more countries added.
The client wants to have only one DB Link that can connect oracle to all three databases. Is it even possible?
If not what other approach can we take to pick the data from client side.
Thanks,
Vaibhav
|
|
|
Re: One to Many [message #636619 is a reply to message #636618] |
Wed, 29 April 2015 04:50 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
As far as I can tell, one database links establishes connection to one database. Documentation says:Oracle
A database link is a connection between two physical database servers that allows a client to access them as one logical database.
That would mean that you can't do what client wants (besides, why does the client even care about it? He wants to see the data, he shouldn't care about the way you do it - one database link or three of them).
Another approach? As many database links as needed. The view you mentioned would then be a UNION, such as
create view my_view as
select col1, col2, ...
from table@database_link_1
union all
select col1, col2, ...
from table@database_link_2
union all
select col1, col2, ...
from table@database_link_3
|
|
|
|
Re: One to Many [message #636621 is a reply to message #636618] |
Wed, 29 April 2015 05:20 |
gazzag
Messages: 1119 Registered: November 2010 Location: Bedwas, UK
|
Senior Member |
|
|
Quote:
The client wants to have only one DB Link that can connect oracle to all three databases. Is it even possible?
No.
Quote:If not what other approach can we take to pick the data from client side.
One link per database.
|
|
|