0

I have the following situation in an Oracle database.

I am user Bob on a local database, LOCAL, and the current schema I am in is not the user's schema, but a different one, let's say Alice. What I would like to do is to create a database link within this context to a remote database REMOTE. I figured I could do something like this:

create database link db_link connect to ALICE identified by <alice_password> using 'remote';

I am being Bob with current schema being ALICE. When I try to do this I get an ORA-01031 - Insufficient Privileges.

So I ask the database administrator and I am told that this is not possible. I am trying to understand but I have difficulties. I seek better background understanding. The reason that is given is that the problem is exactly that I am Bob and the current schema is Alice, and that is simply not possible.

I'd be grateful if someone could explain it to me (and others interested) why this is not possible?

The option to use a public database link is out there, but we try to find a solution using a private database link. I'd like to try my best to find a solution. The context (that I am Bob in a schema Alice) is the context in which the application is running. We cannot change that :-(

asked Aug 5, 2022 at 15:05

1 Answer 1

3

It is not possible because it was designed this way.

CREATE DATABASE LINK

Restriction on Creating Database Links

You cannot create a database link in another user's schema, and you cannot qualify dblink with the name of a schema.

answered Aug 5, 2022 at 15:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.