---------------------------------------------------
Select name from v$database;
create table apps.INVALID_HARMEET
as select * from dba_objects where status='INVALID';
Select count(1) FROM apps.INVALID_HARMEET ;
Check for new invalids after patching / Activity
---------------------------------------------------
COLUMN object_name FORMAT A30
COLUMN status FORMAT A9
COLUMN owner FORMAT A11
Select name from v$database;
Select count(1) FROM dba_objects WHERE status = 'INVALID';
select object_name,object_type,owner,LAST_DDL_TIME from dba_objects where status = 'INVALID' and
object_name||owner not in (select object_name||owner from apps.INVALID_HARMEET );
) ;
Create compile statement for new invalids
---------------------------------------------------
select 'alter '||object_type||' '||owner||'.'||OBJECT_NAME||' compile;' from dba_objects a
where status = 'INVALID'
and not exists
(select 0 from INVALID_HARMEET b where b.object_name=a.object_name and b.owner=a.owner);
===================================================================
No comments:
Post a Comment