查询无效对象 及 重新编译

-- invalid object statistics:
select owner, object_type, status, count(*) 
from dba_objects
where status='INVALID'
group by owner, object_type, status 
order by owner, object_type;

-- select invalid object and compile SQL.
select owner, object_name, object_type, status,
'alter ' || object_type || ' ' || object_name||' Compile;'as sql
from dba_objects
where status='INVALID'
order by 1, 2,3;
posted on 2016-01-13 11:46  思静  阅读(392)  评论(0编辑  收藏  举报