Reputation: 9
machine A has table1 (database in oracle version- 11g)
machine B has table2 (database in oracle version- 11g)
I have created a database link in machine A to access data from machine B
So when I use the select query in machine A select * from table2@dblink
I can access the data.
The problem is, I want to create link but I don't want to specify the link name like in above query.
Is there a way to access data remotely without specifying a link name. The reason behind doing this is to have access over data from remote machine but the users should not know where the data is coming from.
Upvotes: 0
Views: 39
Reputation: 50067
You could create a view to access TABLE2@DBLINK
in the database on machine A:
CREATE OR REPLACE VIEW TABLE2 AS
SELECT * FROM TABLE2@DBLINK
Now on machine A you can write
SELECT * FROM TABLE2
without specifying the link.
Best of luck.
Upvotes: 1