February 28, 2008

Find & Recompile invalid objects

-- Find invalid objects
select OWNER , OBJECT_TYPE , OBJECT_NAME,STATUS
from dba_objects
where status != 'VALID'
order by owner, object_type;

-- Recompile invalid objects
select 'ALTER ' OBJECT_TYPE ' ' OWNER '.' OBJECT_NAME ' COMPILE;'
from dba_objects
where status = 'INVALID'

No comments:

Secure a Microsoft Fabric data warehouse

  Data warehouse in Microsoft Fabric is a comprehensive platform for data and analytics, featuring advanced query processing and full transa...