Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DB Links , Schema, Tables and Synonyms - access scenarios

Jeevanantham VOct 31 2017 — edited Oct 31 2017

Required few clarifications on accessing tables and synonyms between schemas and Databases.

Database: A  ( Db Link: ABC)

  1. Schema: A1   -> Tables: Employee  , Synonym: Employee_syn ( Private)  ,  Employee ( Public)  - Created as Public with same name as table)
  2. Schema: A2   -> Tables: Employee.
  3. Schema.A3  ->

Now i tried to access these objects from Database B. My queries are:

1. Select A1.employee@ABC  ->  Employee table will be accessed from Schema 1.

2. Select employee@ABC  ->  Which schema it will choose ? Schema A1 or A2? Table or Synonym(PUBLIC)?

3. Select A3.employee@ABC  -> I believe, Public Synonym:Employee will be accessed in Schema 3. Please clarify.

Please explain, purpose of creating synonym with same table name in Public mode? How it can be accessed between databases and Schemas?

Thanks in advance.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 28 2017
Added on Oct 31 2017
2 comments
445 views