1

Topic: Drop dblink, ORA-01031: insufficient privileges

I can not delete dblink.
Oracle Database 11g Release 11.2.0.4.0,  the user dbareader.
I come under the user, the user made dba for the test.
Why insufficient privileges? Where to dig?

SQL>
SQL>
SQL> show user;
USER is "DBAREADER"
SQL>
SQL>
SQL> select * from dba_db_links;
OWNER DB_LINK USERNAME HOST CREATED
---------- ---------- ---------- ----------------------------------- ----------
PUBLIC blablabla DBAREADER (DESCRIPTION = (ADDRESS_LIST = (ADDR 29-MAR-16
ESS = (PROTOCOL = TCP) (HOST = blabla
blabla) (PORT = 1521))) (CONNECT_DA
TA = (SID = blabla)))
PUBLIC blablabla blablaa (DESCRIPTION = (ADDRESS_LIST = (ADD 14-AUG-17
RESS = (PROTOCOL = TCP) (HOST = "10.
10.10.10") (PORT = 1521))) (CONNECT
_DATA = (SID = blablabla)))
DBAREADER OOPWORK DBAREADER 06-SEP-17
(DESCRIPTION =
(ADDRESS =
(PROTOCOL=TCP)
(HOST=10.9.8.7)
(PORT=1521)
)
(CONNECT_DATA =
(SERVICE_NAME=OOPWORK)
)
)
SQL>
SQL>
SQL> select * from dba_sys_privs where grantee = ' DBAREADER ';
GRANTEE PRIVILEGE ADM
---------- ----------------------------------- ---
DBAREADER CREATE SESSION NO
DBAREADER SELECT ANY TABLE NO
DBAREADER UNLIMITED TABLESPACE NO
DBAREADER ALTER DATABASE LINK NO
DBAREADER DROP PUBLIC DATABASE LINK NO
DBAREADER CREATE DATABASE LINK YES
6 rows selected.
SQL>
SQL>
SQL> select * from user_role_privs;
USERNAME GRANTED_ROLE ADM DEF OS_
---------- ------------------------------ --- --- ---
DBAREADER DBA NO YES NO
SQL>
SQL>
SQL> drop database link OOPWORK;
drop database link OOPWORK
*
ERROR at line 1:
ORA-01031: insufficient privileges
SQL> Disconnected from Oracle Database 11g Release 11.2.0.4.0 - 64bit Production

2

Re: Drop dblink, ORA-01031: insufficient privileges

g_andrew11;
Probably - Doc ID 973635.1

3

Re: Drop dblink, ORA-01031: insufficient privileges

select sys_context (' userenv ', ' current_schema ') from dual

4

Re: Drop dblink, ORA-01031: insufficient privileges

Ljubomudrov wrote:

select sys_context (' userenv ', ' current_schema ') from dual

The trigger _ changed on logon.
Thanks,  it was deleted!