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博客 ” ,链接:http://blog.itpub.net/22036495/viewspace-1058869/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22036495/viewspace-1058869/