oracle ORA-02019: 找不到远程数据库的连接描述
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39270446/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ORA-02019: connection description for remote database not found
提问by Deepansh Anand
I have created a db link AM_ADMIN
throufh SQL Developer:
我AM_ADMIN
通过 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:
我正在尝试检查它是否是有效的数据库链接。当我从 SQL Developer 向导测试它时,它成功了。但是当我使用以下命令时:
SELECT * FROM dual@AM_ADMIN
I'm getting the error:
我收到错误:
ORA-02019: connection description for remote database not found
ORA-02019: 找不到远程数据库的连接描述
How can I rectify this error?
我该如何纠正这个错误?
回答by Alex Poole
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:
根据您的屏幕截图,您将数据库链接创建为AM_ADMIN.INT.xxx
. 您在没有域的情况下调用它,就像@AM_ADMIN
. 除非您有一个具有相同域值的sqlnet.ora
定义names.default_domain
(并且配置了 SQL Developer 以识别它),否则您在使用链接名称时需要完全质量化:
SELECT * FROM dual@AM_ADMIN.INT.xxx
回答by Steven Wolfe
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.
当数据库链接未设为 PUBLIC 且创建链接的用户与尝试使用该链接的用户不同时,将发生此错误。例如,以 SYS 用户身份创建链接,然后尝试以 AM_ADMIN 用户身份使用链接。
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.
在这种情况下,要么将链接设为 PUBLIC(然后所有用户都可以访问),要么授予 AM_ADMIN 用户创建数据库链接的权限。
回答by Ali Mika
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:
我遇到了同样的问题,我发现这是由(Description = (... HOST = !...)
. 当您在USING
子句中创建数据库链接时,您应该:
- use the keyword
HOST
if you are using the IP address - use keyword
HOSTNAME
if you are using the name
HOST
如果您使用 IP 地址,请使用关键字HOSTNAME
如果您使用名称,请使用关键字
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...
我只是想分享它,因为我花了半天时间试图弄清楚这一点,但我找不到任何有关它的信息......