oracle的schema错误检查,执行EXECUTE DBMS_UTILITY.COMPILE_SCHEMA('USER');出错,难以解决!...

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值