问题
I have created a db link AM_ADMIN
throufh SQL Developer:
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