This document describes about insufficient privileges issue while creating synonym.
Issue:
SQL> show user
USER is "ADAM"
SQL> create synonym emp for scott.emp;
create synonym emp for scott.emp
*
ERROR at line 1:
ORA-01031: insufficient privileges
Cause and Solution:
Issue is coming because user ADAM does not have create synonym privilege.
Connect to sys and give create synonym privilege to ADAM.
SQL> conn sys as sysdba
Enter password:
Connected.
SQL> grant create synonym to adam;
Grant succeeded.
SQL>
Validation:
SQL> show user
USER is "ADAM"
SQL> create synonym emp for scott.emp;
Synonym created.
SQL> select count(*) from emp;
COUNT(*)
----------
14
USER is "ADAM"
Synonym created.
SQL> select count(*) from emp;
COUNT(*)
----------
14
SQL>
Thanks for your patience to view the post.........
No comments:
Post a Comment