Ora-01031 When Compiling A Synonym (Doc ID 1299001.1)

Last updated on NOVEMBER 04, 2015

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.5 and later   [Release: 10.2 and later ]
Information in this document applies to any platform.

Symptoms

When any user being granted the DBA role tries to compile synonyms of other users it will get the following errors:

SQL> conn system/manager
Connected.


SQL> create synonym scott.emps for scott.emp;

Synonym created.

SQL> alter synonym scott.emps compile;
alter synonym scott.emps compile
*
ERROR at line 1:
ORA-01031: insufficient privileges




The synonyms can be compiled by SYS or by the synonyms' owners:



SQL> conn / as sysdba
Connected.
SQL> alter synonym scott.emps compile;

Synonym altered.

SQL> conn scott/tiger
Connected.


SQL> alter synonym scott.emps compile;
Synonym altered.



Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms