PL/SQL Block Is Choosing A PUBLIC Database Link Versus The PRIVATE Link Of The Same Name.
Last updated on APRIL 08, 2013
Applies to:Oracle Database - Enterprise Edition - Version 22.214.171.124 and later
Information in this document applies to any platform.
We recently "privatized" our PUBLIC database links which went OK except that a number of users still required the PUBLIC database link to get their information. I created a PUBLIC database link with the same name and gave the link connection SELECT ANY TABLE privileges.
Now the code which was successfully using the PRIVATE database link is using the PUBLIC database link causing issues.
As per all the documentation I've found, Oracle first searches for a private database link in your own schema with the same name as the database link in the statement. Then, if necessary, it searches for a public database link with the same name.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms