0
votes

Enter user-name: scott/tiger

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> create synonym sy1 for tests;
create synonym sy1 for tests
*
ERROR at line 1:
ORA-01031: insufficient privileges
1
Not being sarcastic: what part of "insufficient privileges" is confusing you, exactly? Oracle is a secure system and you can't do anything unless you've been granted the necessary privileges. - Jeffrey Kemp

1 Answers

2
votes

The error message is very clear:

ERROR at line 1: ORA-01031: insufficient privileges

From documentation:

Prerequisites

To create a private synonym in your own schema, you must have the CREATE SYNONYM system privilege.

To create a private synonym in another user's schema, you must have the CREATE ANY SYNONYM system privilege.

To create a PUBLIC synonym, you must have the CREATE PUBLIC SYNONYM system privilege.

You need to ask your DBA (or log as priviliged user and run):

GRANT CREATE ANY SYNONYM TO scott;