Can you create a database link back to same database instance?

Hi,

I have this application that archives data to a different schema on the same 
instance using database link. This is probably due to the fact that in the 
Production environment it is archived to a different instance.  Two schemas  
are using database links to connect to themselves. One successfully connects 
using the same service name to itself but the other does not.  I am wondering 
what the trick the schema has while the other one can't connect.

Example: In tnsnames.ora two service names are defined DB1 and DB2 (these are 
also the SID's)

At DB1 instance a public database link is created.

CREATE PUBLIC DATABASE LINK arcdb CONNECT TO arc_db IDENTIFIED BY .....
USING "DB1";

This works. But in the other instance,

CREATE PUBLIC DATABASE LINK arcdb CONNECT TO arc_db IDENTIFIED BY ...
USING "DB2";

doesn't work.

So it seems that you can create a database link back to the same database 
instance. If not I wonder what the trick by the other db?

Thanks.

Romeo Ybanez



      
--
http://www.freelists.org/webpage/oracle-l


Other related posts: