Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Roles and Private Synonyms
I'm having a little difficulty finding information regarding how Oracle manages roles and private synonyms. My problem is as follows:
I do not have any public synonyms defined.
In a single Oracle Instance I have 2 schemas of the same database for separate use of a single application, eg. once machine maintenance and ones property maintenance:
machine property
You create roles as follows, for example:
create role machine_general;
grant select,update,delete,insert on machine.table1 to
machine_general;
grant select,update,delete,insert on machine.table2 to machine_general;
create role property_general;
grant select,update,delete,insert on property.table1 to
property_general;
grant select,update,delete,insert on property.table2 to property_general;
And then you create private synonyms for your application access as follows:
create synonym table1 for machine.table1; create synonym table2 for machine.table2; create synonym table1 for property.table1; create synonym table2 for property.table2;
Questions:
I assume that, if the user starts the application against the machine schema,
then the synonyms defined for the machine schema are used because they are
private to the machine schema eventhough the synonym names are the same in each
schema. Is this correct?? My assumption is based on Oracle trying to resolve access at the schema level first, then moving up the chain.
3. In addition to question 2, if the public synonym has not been defined then an access violation should be generated. Is this correct??
TIA
regards
Stephen
--Received on Wed Jul 09 1997 - 00:00:00 CDT
===========================================
Stephen Walsh Helix Systems Pty Ltd Ph: +61 7 3846 1999 Fax: +61 7 3846 2122 Email: stevew_at_helix.com.au Web: http://www.helix.com.au/
===========================================