WINDOWS
e.g.
SQL>
sqlplus / as sysdba;
SQL>
SET LINESIZE 200;
SET PAGESIZE 100;
-- define a output file for writing
SPOOL 'C:\output_SQL.txt';
SELECT owner,
object_name,
created,
timestamp
FROM DBA_OBJECTS
WHERE STATUS = 'INVALID'
ORDER BY OBJECT_NAME;
-- stop to write
SPOOL OFF;
LINUX
e.g.
SQL>
sqlplus / as sysdba;
SQL>
SET LINESIZE 200;
SET PAGESIZE 100;
--define a output file for writing
SPOOL '/tmp/output_SQL.txt';
SELECT owner,
object_name,
created,
timestamp
FROM DBA_OBJECTS
WHERE STATUS = 'INVALID'
ORDER BY OBJECT_NAME;
-- stop to write
SPOOL OFF;
-> to see output file
$ cat /tmp/output_SQL.txt