Pages

Friday, April 5, 2013

ORA-02082: a loopback database link must have a connection qualifier

I have two Oracle databases, one 9.2.0.8 (SID test9) and another 10.2.0.4 (SID test10). I needed to create a database link from test9 to test10 but I always got the following error:

$ sqlplus "sys/password@test9"
SQL> create database link test connect to sys identified by password using 'test10';
create database link test connect to sys identified by password using 'test10'
                         *
ERROR at line 1:
ORA-02082: a loopback database link must have a connection qualifier


After some searching I finally got the solution. Both database global names are test and the link name is also test which ends in the above error:

$ sqlplus "sys/password@test9"
SQL> select * from global_name;
GLOBAL_NAME
-------------
test.karellen
SQL> exit

$ sqlplus "sys/password@test10"
SQL> select * from global_name;
GLOBAL_NAME
-------------
test.karellen
SQL> exit


Specifying another link name did it:

$ sqlplus "sys/password@test9"
SQL> create database link test10 connect to sys identified by password using 'test10';
Database link created.
SQL> select version from v$instance;
VERSION
-----------------
9.2.0.8.0
SQL> select version from v$instance@test10;
VERSION
-----------------
10.2.0.4.0


No comments:

Post a Comment