Oracle Query to list the invalid objects and recompile the invalid objects
Query to List Invalid objects
select owner ,object_type ,object_name from dba_objects where status != 'valid' and object_type <> 'synonym' and owner='slam' order by owner, object_type ;
Query to recompile the invalid objects:
select 'alter ' || object_type || ' ' || owner || '.' || object_name || ' compile;' from dba_objects where lower(status) = 'invalid' and lower(owner)='slam';
No comments:
Post a Comment