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

  • From: Martin Berger <martin.a.berger@xxxxxxxxx>
  • To: raybanez@xxxxxxxxx
  • Date: Tue, 10 Mar 2009 11:33:33 +0100

Which error-message does you get?


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.

Other related posts: