ORA-02019: connection description for remote database not found

点点圈 提交于 2020-05-29 09:41:23

问题


I have created a db link AM_ADMIN throufh 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 successfull. 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?


回答1:


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



回答2:


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.




回答3:


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...



来源:https://stackoverflow.com/questions/39270446/ora-02019-connection-description-for-remote-database-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!