为什么Oracle在软件包编译中抱怨同义词循环(ORA01775)? [英] Why Oracle is complaining about a looping chain of synonyms (ORA01775) in package compilation?

查看:301
本文介绍了为什么Oracle在软件包编译中抱怨同义词循环(ORA01775)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的需要了解为什么下面的行为会发生.

I really need to understand why the behavior below is happening.

首先,我只是创建一个同义词:

First, I just create a synonym:

CREATE SYNONYM SYN_NAME FOR MY_TABE@MY_DBLINK;

第二,当我尝试从表中选择行时,出现以下错误:

Second, when I try to select the rows from the table, the following error appears:

ORA-00942: table or view does not exist

太好了,该表确实不存在.

但是,当我尝试编译使用上述同义词的Package时,编译错误是:

However when I try to compile a Package that is using the synonym above, the compilation error is:

ORA-01775: looping chain of synonyms

在整个数据库中,没有同名的同义词,循环的同义词或数据库链接/同义词冲突.当然,当我在目标数据库链接架构中创建表时,错误就消失了.

There are no synonyms with the same name, cycling synonyms or database link/synonym conflicts in the entire database. Of course that when I create the table in the target database link schema, the errors runaway.

有人可以解释一下为什么错误不相同吗?

Could some one explain me why the errors aren't the same?

推荐答案

更新到Oracle Database 12c版本后,错误改回为:

After updating to the Oracle Database 12c version, the error changed back to:

ORA-00942: table or view does not exist

如果有人遇到这种异常,答案是它可能是缺少的同义词目标,而不是循环同义词.

If someone is experiencing that kind of exception, the answer is that it could be the synonym target missing and don't a loop synonym.

我希望它能对某人有所帮助.

I hope it helps someone.

这篇关于为什么Oracle在软件包编译中抱怨同义词循环(ORA01775)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆