[오라클]INVALID Object 해결
SELECT 'EXEC DBMS_UTILITY.compile_schema(schema => '||owner||');'
FROM dba_objects
WHERE status = 'INVALID'
ORDER BY owner, object_type, object_name
/
set heading off
set feedback off
set linesize 80
select 'alter view "' || object_name || '" compile;'
from user_objects
where object_type = 'VIEW'
and status = 'INVALID'
/
alter view "EMP_PUBLIC_DATA" compile;
alter view "VIEW_T" compile;
alter view "DEPT_EMP_VIEW" compile;
alter view "DEPARTMENT_10" compile;
set heading on
set feedback on
select 'show errors view ' || object_name
from user_objects
where object_type = 'VIEW'
and status = 'INVALID'
/
'SHOWERRORSVIEW'||OBJECT_NAME
--------------------------------------------------------------------------------
show errors view EMP_PUBLIC_DATA
show errors view VIEW_T
show errors view DEPT_EMP_VIEW
show errors view DEPARTMENT_10
4 rows selected.