My Oracle Support Banner

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

Last updated on JANUARY 29, 2020

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.5 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

NOTE: In the images and/or the document content below, the user information and data used represents fictitious data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner. 

 

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

SQL> conn system/xxxxx
Connected.


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

Synonym created.

SQL> alter synonym user1.emps compile;
alter synonym user1.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 user1.emps compile;

Synonym altered.

SQL> conn user1/xxxxx
Connected.


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




Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.