Yes, Slightwv, you're right about instances. We are used to create one Schema for one User with the same name. That 'd be an instance.
Your suggestion is good. However, I don't know how to create a dblink public
-- On Instance1, I create new_user_s1 only read single table:
CREATE USER NEW_USER_S1 ACCOUNT UNLOCK;
GRANT CONNECT TO NEW_USER_S1;
ALTER USER NEW_USER_S1 DEFAULT ROLE ALL;
GRANT SELECT ON TABLE_S1 TO NEW_USER_S1;
-- Running as NEW_USER_S1 user:
CREATE SYNONYM Table_S1 FOR USER_S1.Table_S1;
-- On Instance1, create public dblink
CREATE PUBLIC DATABASE LINK HQ USING 'hq';
-- On Instance2, I can't see dblink 'hq'
SELECT * FROM Table_S1@hq;
--ORA-02019: connection description for remote database not found
Main Topics
Browse All Topics





by: slightwvPosted on 2009-11-02 at 08:52:48ID: 25721065
First some clarification: Schemas in Oracle are basically separate users that own objects.
What you are describing are two Instances running on the same machine.
That being said: Database links are fine as long as your security folks allow them.
I would probably create a seperate user on Schema_s1, grant select on the table to this new user, then create a synonym.
This way if someone compromises the LINK in some way, they only see that single table.