Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Not enough privileges to create a database link

979263Dec 11 2012 — edited Dec 13 2012
Hi,

I have a problem to create a database link with "CREATE DATABASE LINK" (the terms in <> are replaced by appropriate values for my environment):

CREATE PUBLIC DATABASE LINK <nameForLink>
CONNECT TO <user>
IDENTIFIED BY <userName>
USING '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = <URLofHost>)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = <serviceName>)
)
)';

It works perfectly well when I run the corresponding command with the user "system". However, if I use a different user I get the following error:

Error en la línea de comandos:1 Columna:29
Informe de error:
Error SQL: ORA-01031: insufficient privileges
01031. 00000 - "insufficient privileges"
*Cause: An attempt was made to change the current username or password
without the appropriate privilege. This error also occurs if
attempting to install a database without the necessary operating
system privileges.
When Trusted Oracle is configure in DBMS MAC, this error may occur
if the user was granted the necessary privilege at a higher label
than the current login.
*Action: Ask the database administrator to perform the operation or grant
the required privileges.
For Trusted Oracle users getting this error although granted the
the appropriate privilege at a higher label, ask the database
administrator to regrant the privilege at the appropriate label.

I can solve the problem by granting the role DBA to that user (then it works). However, I would like to avoid that. Is this possible? In the documentation I only found that the "CREATE DATABASE LINK" privilege was required and I already granted that privilege, but it seems that it is not enough... Why does the user also need the DBA role to create the database link? Is there any alternative?

Thaks for any tip!!

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 10 2013
Added on Dec 11 2012
3 comments
1,927 views