在工作中,有时会遇到 ORA-01775: looping chain of synonyms的错误,你发现同义词中,没有其他叫这个名字的同义词,但实际是有的,怎么找出这个存在的循环同义词呢:
比如
SQL> CREATE OR REPLACE PACKAGE BODY sys.dbms_logmnr_internal wrapped
...
766 /
Warning: Package Body created with compilation errors.
使用以下语句,可以查找到同义词:
select owner,object_name,object_id,object_type,status
from dba_objects
where object_id in (
select p_OBJ#
from DEPENDENCY$
where d_obj# = (select object_id
from dba_objects
where object_name like 'DBMS_LOGMNR_INTERNAL' and object_type = 'PACKAGE BODY'
)
);
HCKW-0018: OBJECT name clashes with SCHEMA name <<<<
Schema=SYSTEM Object=PUBLIC.SYSTEM (SYNONYM)
There is a public synonym with name SYSTEM
Drop the public synonym SYSTEM and repeat the activity.
之后问题解决。
|