ORA-02019: connection description for remote database not found

Hi,

I got ” ORA-02019: connection description for remote database not found  ” error in Oracle database.

 

 

ORA-02019: connection description for remote database not found

 

Details of error are as follows.

SQL> select * from test_table@myDBlink;
select * from test_table@myDBlink
*
ERROR at line 1:
ORA-02019: connection description for remote database not found

 

 

The ORA-02019: connection description for remote database not found error is related with the missing of Database link or incorrect Dblink name you have used.

 

Firstly check database link ( dblink ) name ( myDBlink ) if it exists or not in the database using the following script.

select * from dba_db_links;

select * from all_db_links;

 

If you check the dblink doesn’t exist as follows.

SQL> select * from dba_db_links where db_link=’myDBlink’;

no rows selected

SQL>

 

Then create the database link as follows. you can create the dblink both private and public.

private dblink is created as follows.

CREATE DATABASE LINK myDBlink
CONNECT TO mehmet
IDENTIFIED BY mehmet
USING '192.168.63.34:1521/DEVECI';

 

Public dblink is created as follows.

CREATE PUBLIC DATABASE LINK myDBlink
CONNECT TO mehmet
IDENTIFIED BY mehmet
USING '192.168.63.34:1521/DEVECI';

 

If you want to learn more details about Database link ( dblink ) and how to create it, read the followin post.

Database Link ( Dblink ) in Oracle Database

 

connection description for remote database not found

Sometimes this error occurs because of Database link used in the VIEW is currently not present or dropped in the Database. If the related view is not present, then create the related view.

 

Sometimes this error occurs because of TNS entry used in the database link. If you use TNS alias in the dblink creation, then check if tns alias exist in the tnsnames.ora. If it doesn’t exist, then you will give this error. To solve this error you need to add the TNS entry to the tnsnames.ora and tnsping TNS_ALIAS command works fine as follows..

[oracle@msdbadm01 ]$ tnsping TNS_ALIAS

TNS Ping Utility for Linux: Version 18.0.0.0.0 - Production on 17-MAY-2020 05:29:07

Copyright (c) 1997, 2019, Oracle. All rights reserved.

Used parameter files:
/u01/app18c/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.63.34)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = MSDB)))
OK (0 msec)
[oracle@msdbadm01 ]$

 

Or you can use hostname, ip, port and service name as follows.

CREATE PUBLIC DATABASE LINK myDBlink 
CONNECT TO mehmet 
IDENTIFIED BY mehmet 
USING '192.168.63.34:1521/DEVECI';

 

 

ORA-02019

Sometimes this error occurs because of public-private dblink. If your dblink is private, then anybody cannot use it. If you want to be used by everyone, then you need to create public dblink as above.

 

 

 

 

Or the other case of this error arise after an upgrade from one version of database to another OR the introduction of a PDB in 12c Multitenant.

At some point since the creation of the database link, the DB_DOMAIN was changed from one value (or possibly null) to a different value.

During the upgrade process the DB_DOMAIN was changed.  It may have been null or not set at all and
now the DB_DOMAIN is populated in the data dictionary so that the origin database (where the link is created)
contains a value for both DB_NAME and DB_DOMAIN.

 

To solve this error, Drop and recreate all dblinks that existed prior to the change of the DB_DOMAIN setting.
Change the DB_DOMAIN to the pre-upgrade value so that it matches the domain that was appended to the original non-working dblink name.

 

Do you want to learn Oracle SQL, then read the following articles.

Oracle SQL Tutorials For Beginners – Learn Oracle SQL from scratch with Oracle SQL Online Course

 

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

One comment

  1. I have created public link(bi) within same domain(bi). However I am still unable to access tables available in domain(bi) from other domain(prod). Getting same error ORA-02019

Leave a Reply

Your email address will not be published. Required fields are marked *