Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Public db link Vs Private db link

Status
Not open for further replies.

oradbus

IS-IT--Management
Oct 4, 2005
1
0
0
US
Hi all,
I login as Mary in DBX to run a query (accessing DBY using db link) and got the following error:

select emp_id, emp_name
from scott.emp@SCOTT_link order by emp_name
ORA-02019: connection description for remote database not found


The db link used to be public one and it worked until it had changed to a private db link owned by Scott. Scott.emp table doesn't exist in DBX but exists in DBY. Mary exists in DBX but not in DBY.

What needs to be done for mary to be able to query using the db link? Does she need some kind of priv to use the db link?

Thanks!
 
Hi

If its owned by scott then you would need to use scott.SCOTT_link but as the link effectively gives access to another schema on another DB you may not be allowed to use it.

regards
 
If the private db link SCOTT_link is owned by Mary then she needs no privs. If it's owned by someone else, then you need to create a private db link as the user Mary (in which case she'll need the create database link privilege). Private database links can only be used by the person who created/owns them. The error you're seeing could also be from an incorrect tnsnames.ora setup. the create database link...using 'DBY'; DBY must be resolvable in the tnsnames.ora file. Hopes this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top