BEGIN
  DBMS_UTILITY.compile_schema(USER, FALSE);
  FOR z IN (SELECT 'ALTER VIEW ' || object_name || ' COMPILE' s
              FROM dba_objects WHERE owner = USER AND
            status = 'INVALID' AND object_type = 'VIEW') LOOP
    BEGIN
      EXECUTE IMMEDIATE z.s;
    EXCEPTION
      WHEN OTHERS THEN
        NULL;
    END;
  END LOOP;
END;
/