Pl/Sql Package Invalid When Compiling Procedure Due to Duplicate Name Database Link
(Doc ID 301804.1)
Last updated on JULY 05, 2017
Applies to:PL/SQL - Version 18.104.22.168 and later
Information in this document applies to any platform.
There are two schemas on the same database with database links using the same database link name but point to two different databases.
Schema1 has a private database link Link1 which connects to DB1 using a username/pwd.
Schema2 has a private database link Link1 which connects to DB2 using a username/pwd.
When the PKG1 package is compiled, package which uses the database link to select records from schema1, PKG2 under Schema 2 becomes invalid.
Then when PKG2 is compiled under Schema 2, then PKG1 becomes invalid.
Once the database Link1 is renamed to a unique name the problem goes away.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!