SQL>
SQL> set heading off
SQL> set feedback off
SQL> set linesize 80
SQL>
SQL> select 'alter view "' || object_name || '" compile;'
2 from user_objects
3 where object_type = 'VIEW'
4 and status = 'INVALID'
5 /
alter view "EMP_PUBLIC_DATA" compile;
alter view "VIEW_T" compile;
alter view "DEPT_EMP_VIEW" compile;
alter view "DEPARTMENT_10" compile;
SQL> spool off
not spooling currently
SQL> set heading on
SQL> set feedback on
SQL>
SQL> select 'show errors view ' || object_name
2 from user_objects
3 where object_type = 'VIEW'
4 and status = 'INVALID'
5 /
'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.
SQL>
SQL>