Oracle7 Server Distributed Systems Volume I: Distributed Data
Object Resolution and Location Transparency
When defining views, synonyms, and procedures that reference remote objects, consider the following issues so that your views, synonyms, and procedures always access the intended objects with the
intended privileges:
- Unless all remote objects are explicitly qualified with their schema names, the accessed object is dependent on the connection established via the specified database link. For example, if you want a local synonym's remote base table to be SCOTT.EMP, explicitly specify schema SCOTT in the synonym definition:
CREATE SYNONYM emp FOR scott.emp@hq.acme.com;
- Database links defined with a CONNECT TO clause always connect to the remote database as the user specified in the CONNECT TO clause. Views, synonyms, and procedures that use this type of database link are always subject to the privileges and schema resolution of the specified remote user.
Alternatively, when database links without a CONNECT TO clause are used in the definition of a view, synonym, or procedure, the remote connection is dependent on the local user. Views and procedures should typically use database links with explicit accounts to ensure that they can function with the proper remote authorizations.