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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s