ORA-02011: duplicate database link name

ORA-02011: duplicate database link name

Cause:

While creating a database link, duplicate error is thrown.

SQL> create database link exdbx connect to test identified by "password" using 'EXDBX';
create database link exdbx connect to test identified by "password" using 'EXDBX'
                     *
ERROR at line 1:
ORA-02011: duplicate database link name

Workaround:

Check if already database link exists with the same name and use a different name for the new one

SQL> select * from dba_db_links where DB_LINK like '%EXDBX%';

OWNER
--------------------------------------------------------------------------------
DB_LINK
--------------------------------------------------------------------------------
USERNAME
--------------------------------------------------------------------------------
HOST
--------------------------------------------------------------------------------
CREATED
---------
SYS
EXDBX
TEST

OWNER
--------------------------------------------------------------------------------
DB_LINK
--------------------------------------------------------------------------------
USERNAME
--------------------------------------------------------------------------------
HOST
--------------------------------------------------------------------------------
CREATED
---------
exdbx
15-JUN-21

Leave a Reply

%d bloggers like this: