Skip to Main Content
  • Questions
  • Privileges for apex schema to perform database link

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Tomasz.

Asked: August 30, 2023 - 6:00 pm UTC

Last updated: August 31, 2023 - 1:46 am UTC

Version: 23.1.3

Viewed 1000+ times

You Asked

Hi Tom,

I am pretty new and don't know much, but spent solid amount of time and couldn't figure it out.

I am trying to establish db link to oracle database through apex express, but when I fill all necessary data and try to do it in object browser -> Database Link I receive following error:
"The DB_LINK schema does not have the required privileges to create this object."

However, after inspecting privileges in manage services -> workspace utilities it has all privileges granted. I've tried to perform Database Administration Login in SQL Workshop as well and my admin account isn't valid.

Thanks,

Tomek

and Connor said...

The schema that your APEX workspace is connected to needs the CREATE DATABASE LINK privilege.

eg, I fire up APEX and login as JOE to my workspace called ASK_WS. That workspace is bound to the ASKTOM schema in my database.

I try to create a db link and get this:

DB_LINK_PRIVS

Now I log on to SQL Plus and do:

SQL> grant create database link to asktom;

Grant succeeded.


and then the create option now works in Object Browser.

So you need to do the grant to the *schema* for the workspace you are in.

We're not taking comments currently, so please try again later if you want to add a comment.

More to Explore

APEX

Keep your APEX skills fresh by attending their regular Office Hours sessions.