[Oracle]-[synonym]-public and non-public synonyms

Source: Internet
Author: User

[Oracle]-[synonym]-public and non-public synonyms [Symptom]: The Sys account creates a public synonym for the t_emp table of the bisal account. The bisal user can access t_emp_syn, but the scott account cannot query, select... t_emp_syn indicates that the table or view does not exist. SQL> select * from t_emp_syn; select * from t_emp_syn * ERROR at line 1: ORA-00942: table or view does not exist [cause]: Scott no bisal. the access permission of the t_emp table. Therefore, the system prompts that the table or view does not exist. [Solution]: Run grant select on t_emp to scott using bisal. Run t_emp_syn using scott. SQL> select * from t_emp_syn; EMPNO EN DEPTNO ---------- -- ---------- 1 c 1 2 d 2 3 f 0 10 1 1 12 1a 1 [summary]: Public synonym, if A user A needs to access the synonym of the table created by another user B, user B needs to have access to the table (that is, the base table. If it is a common synonym, DBA users can access non-public synonyms created by any user, but different common users, unless the access permission of the base table is granted, otherwise, you cannot access non-public synonyms of other users at will. This is also the purpose of public. You can create multiple synonyms for a basic definition.
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.