返回日记本

ORACLE巡检后编译失效对象

检查失效对象:

select owner,object_name,object_type from dba_objects where status = 'INVALID';

 

根据对象类型生成编译脚本

 

 

select 'alter '||object_type|| ' '||object_name||' compile;'   from dba_objects where status = 'INVALID';

 select 'alter '||object_type|| ' '||owner||'.'||object_name||' compile;'   from dba_objects where status = 'INVALID';

复制查询结果 到command窗口批量执行。


原文章浏览量:1191

原文章分类:数据库

原文链接:https://www.iteye.com/blog/lizhiyu-2153270