oracle的schema错误检查,执行EXECUTE DBMS_UTILITY.COMPILE_SCHEMA('USER');出错,难以解决!...
FROM Metalink:Problem Description-------------------When using DBMS_UTILITY.COMPILE_SCHEMA, you receive thefollowing error:ORA-01436:CONNECT BY loop in user dataSolution Description-----------------..
FROM Metalink:
Problem Description
-------------------
When using DBMS_UTILITY.COMPILE_SCHEMA, you receive the
following error:
ORA-01436: CONNECT BY loop in user data
Solution Description
--------------------
There can also be other reasons for using another way of compiling,
for example, you may wish to compile objects for more than one schema.
Use this statement:
SELECT 'alter ' || object_type || ' ' || object_name || ' compile;'
from USER_OBJECTS
where status!='VALID'
and object_type not in ('PACKAGE BODY', 'INDEX', 'SYNONYM', 'TABLE', 'DATABASE LINK');
Spool the results to the script file, then run it manually. If it is necessary to compile
objects from more than one schema, change the USER_OBJECTS to ALL_OBJECTS or DBA_OBJECTS. It is necessary to add column OWNER to the SELECT command:
SELECT 'alter ' || object_type || ' ' || owner || '.' || object_name || ' compile;'
from ALL_OBJECTS
where status!='VALID'
and object_type not in ('PACKAGE BODY', 'INDEX', 'SYNONYM', 'TABLE', 'DATABASE LINK');
Note that object type PACKAGE BODY needs to be compiled individually.
Explanation
-----------
This is due to [BUG:895238].
Compiling objects one by one takes a lot of time.
References
----------
[BUG:895238] DBMS_UTILITY.COMPILE_SCHEMA can fail with ORA-1436 in 8.1
Additional Search Words
-----------------------
compile, user_objects
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐



所有评论(0)