ORA-02019: connection description for remote database not found

I have created a db link AM_ADMIN through SQL Developer:

enter image description here

I am trying to check if it is a valid database link. When I test it from the SQL Developer wizard it is successful. But when I use the below command:

SELECT * FROM dual@AM_ADMIN 

I'm getting the error:

ORA-02019: connection description for remote database not found

How can I rectify this error?

7

3 Answers

According to your screenshot you created the database link as AM_ADMIN.INT.xxx. You are calling it without the domain, just as @AM_ADMIN. Unless you have a sqlnet.ora which defines names.default_domain with the same domain value (and have SQL Developer configured to recognise that), you will need to fully-quality the link name when you use it:

SELECT * FROM dual@AM_ADMIN.INT.xxx 
6

This error will occur when a database link is not made PUBLIC, and the user who created the link is different to the user attempting to use the link. For example, creating the link as the SYS user and then trying to use the link as the AM_ADMIN user.

In this instance either make the link PUBLIC (which all users can then access), or grant the AM_ADMIN user the privileges to create a database link.

I had the same problem and I found out that it was a stupid error caused by (Description = (... HOST = !...). When you create Database Link in USING clause, you should:

  • use the keyword HOST if you are using the IP address
  • use keyword HOSTNAME if you are using the name

I just wanted to share it because I lost half a day trying to figure that out and I couldn't find any information about it...

ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJoanJqZ2WBdYKOqKmaZWBnfXKFjJymp6aVmMGqu81mm56rk6e2scDIqKVmnp%2BnerOxzKirnmWUlsGirsCsnGamn6l6p7vUp5s%3D