Oracle 10g /11g - ORA-02082: a loopback database link must have a connection qualifier

I refreshed/cloned an Oracle 11.2.0.2 database from Production and I received the following error while dropping a database link:

SYS@ZERO SQL>drop  public database link ZERO;
drop  public database link ZERO
                           *
ERROR at line 1:
ORA-02082: a loopback database link must have a connection qualifier


Cause:

You are trying to create or drop a database link to the same database name. This is an expected behavior.

Solution:
Rename the global_name of the database before you can drop the database link.

SYS@ZERO SQL>select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
ZERO.VAIDIYAN.COM


SYS@ZERO SQL>


SYS@ZERO SQL>drop  public database link ZERO;
drop  public database link ZERO
                           *
ERROR at line 1:
ORA-02082: a loopback database link must have a connection qualifie
r


SYS@ZERO SQL>alter database rename global_name to TEST;

Database altered.

SYS@ZERO SQL>drop  public database link ZERO;

Database link dropped.


SYS@ZERO SQL>alter database rename global_name to ZERO;

Database altered.

SYS@ZERO SQL>select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
ZERO.VAIDIYAN.COM


SYS@ZERO SQL>

Reference:
ORA-02082 TRYING TO DROP A PUBLIC DBLINK (Doc ID 1070826.6)

No comments:

Post a Comment