ITPub博客

首页 > 数据库 > Oracle > oracle编译无效对象

oracle编译无效对象

原创 Oracle 作者:chenfengwww 时间:2012-07-20 22:56:54 0 删除 编辑

alter function function_name compile;
alter package package)name compile;
alter type type_name compile;
alter index index_name rebuild;[@more@]


select substr(object_name,1,40) object_name,substr(owner,1,15) owner,object_type
from dba_objects
where status='INVALID' order by owner,object_type;


1. Oracle SQL *Plus 中 —— 用 spool 生成脚本文件,然后 @ 调入执行,代码如下:
spool ExecCompProc.sql
select 'alter procedure '||object_name||' compile;' from all_objects
where status = 'INVALID' and object_type = 'PROCEDURE' AND owner='UNMI';
spool off
@ExecCompProc.sql;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22036495/viewspace-1058869/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: linux配置nfs
下一篇: rman完全恢复
请登录后发表评论 登录
全部评论

注册时间:2009-07-04

  • 博文量
    118
  • 访问量
    460764