ORA-01775:循环同义词链 [英] ORA-01775: looping chain of synonyms

查看:290
本文介绍了ORA-01775:循环同义词链的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个表(下面是代码)-这是通过UNIX上的某些脚本执行的.该脚本还创建了一些同义词(不确定什么/方式):

I am creating a table (here below is the code) - this is executed through some script on unix. The script also creates some synonyms (not sure what/how):

drop table BNS_SAA_MESSAGES;
CREATE TABLE BNS_SAA_MESSAGES
(
HostNumber varchar(50) NOT NULL,
SAAMessage varchar(2048) NOT NULL,
PRIMARY KEY (HostNumber)
);

我遇到以下错误:

Processing bns_saa_messages
cat: cannot open bns_saa_messages.sql

Commit complete.

GRANT SELECT ON bns_saa_messages TO RL_ORDFX_RPT

GRANT SELECT ON bns_saa_messages TO RL_ORDFX_RPT
                *
ERROR at line 1:
ORA-01775: looping chain of synonyms


GRANT INSERT ON bns_saa_messages TO RL_ORDFX_RPT

GRANT INSERT ON bns_saa_messages TO RL_ORDFX_RPT
                *
ERROR at line 1:
ORA-01775: looping chain of synonyms


GRANT UPDATE ON bns_saa_messages TO RL_ORDFX_RPT

GRANT UPDATE ON bns_saa_messages TO RL_ORDFX_RPT
                *
ERROR at line 1:
ORA-01775: looping chain of synonyms


GRANT DELETE ON bns_saa_messages TO RL_ORDFX_RPT

GRANT DELETE ON bns_saa_messages TO RL_ORDFX_RPT
                *
ERROR at line 1:
ORA-01775: looping chain of synonyms


create public synonym bns_saa_messages for ORDMSO.bns_saa_messages

create public synonym bns_saa_messages for ORDMSO.bns_saa_messages
                      *
ERROR at line 1:
ORA-00955: name is already used by an existing object



Commit complete.

我用Google搜索了ORA-01775: looping chain of synonyms,这似乎意味着已删除某些内容,但有指向该内容的指针.我猜想它是在select期间从不再存在的事物"中发生的.不知道这些东西是桌子还是其他东西.这是我从研究中收集到的.

I googled for ORA-01775: looping chain of synonyms and it seems to mean that a something was removed but there is a pointer to it. I'm guessing it happens during select from 'things' that do not exist anymore. Not sure if these things are tables or something else. This is what I gathered from my research.

任何想法如何创建我的表?我尝试执行多次SQL代码,但无济于事-每次都会遇到相同的错误.

Any idea how to create my tables? I tried to execute multiple times the SQL code, but to no avail - I get the same error every time.

还没有创建表:

SQL> select * from bns_saa_messages;
select * from bns_saa_messages
              *
ERROR at line 1:
ORA-01775: looping chain of synonyms

我已经研究了以下问题,但似乎没有帮助.也许您可以看到我看不到的东西:
我收到了ORA -01775:当我使用sqlldr时,循环的同义词链错误
如何调试ORA-01775:循环同义词链? a>
ORA-01775:循环同义词链,但在那里没有同义词

I've looked at the following so questions, but it doesn't seem to be helping. Maybe you can see something I don't:
I get an ORA-01775: looping chain of synonyms error when I use sqlldr
How to debug ORA-01775: looping chain of synonyms?
ORA-01775: looping chain of synonyms but there are no synonyms

谢谢

:更新:

执行后:根据Craig的建议,select * from all_synonyms where synonym_name = 'BNS_SAA_MESSAGES';我得到:

After executing: select * from all_synonyms where synonym_name = 'BNS_SAA_MESSAGES'; as per Craig's suggestion I get:

OWNER                          SYNONYM_NAME
------------------------------ ------------------------------
TABLE_OWNER                    TABLE_NAME
------------------------------ ------------------------------
DB_LINK
--------------------------------------------------------------------------------
PUBLIC                         BNS_SAA_MESSAGES
ORDMSO                         BNS_SAA_MESSAGES

:更新:2
运行:select * from all_tables where table_name = 'BNS_SAA_MESSAGES';

:UPDATE: 2
Running: select * from all_tables where table_name = 'BNS_SAA_MESSAGES';

SQL> select * from all_tables where table_name = 'BNS_SAA_MESSAGES';

no rows selected

推荐答案

看起来输出是第二次运行,您曾暗示过; create public synonym中的ORA-00955显示该操作在某处之前已完成(您运行的all_synonyms查询也是如此),并且显然还存在其他错误.第一次运行时,您不会完全得到这些错误,但是在以后的每次运行中都会发生.

It looks like the output is from running this a second time, which you hinted at; the ORA-00955 from the create public synonym shows that has been done before somewhere (as does the all_synonyms query you ran), and it clearly exists from the other errors. You wouldn't have got exactly these errors the first time you ran it, but would on every subsequent run.

至少,如果您希望它可以重新运行,则第一个代码段应在删除表之前删除公共同义词.

At a mimimum the first code snippet should drop the public synonym before dropping the table, if you want it to be rerunnable.

但是第一个代码段似乎根本没有运行.没有来自Oracle的成功或失败消息.唯一真正的原因是这样的:

But the first snippet doesn't seem to be run at all. There are no success or failure messages from Oracle. The only real clue to why is this:

Processing bns_saa_messages
cat: cannot open bns_saa_messages.sql

这是一个shell脚本问题,不是Oracle真正的问题.在没有看到shell脚本的情况下,很难说出问题出在哪里,但是我怀疑该脚本正在从各种来源构建一个临时的.sql文件,然后通过SQL * Plus运行它.但是缺少重要的bns_saa_messages.sql文件.大概就是第一个片段应该在的地方;并且由于这似乎存在,因此可能很简单,例如文件与脚本期望的名称不匹配,或者脚本执行cd且文件位于错误的目录中,或者有些琐碎的事情.但是也许...信息不足.

Which is a shell script problem, not really an Oracle one. Without seeing the shell script it's rather hard to tell quite what's wrong, but I suspect the script is building a temporary .sql file from various sources and then running it through SQL*Plus; but the vital bns_saa_messages.sql file is missing. Presumably that's where the first snippet is supposed to be; and since that seems to exist, this could beas simple as a name mismatch between the file and what the script is expecting, or the script is doing a cd and the file is in the wrong directory, or something equally trivial. But maybe not... not enough info.

这篇关于ORA-01775:循环同义词链的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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