Sep 21 2007
Log SQL results
If you’d like to log the result from a sql script, just prepare your sql script like that:spool result.log
SET SERVEROUTPUT ON
select * from dual;
spool off
exit
Then from a command line or a script shell execute the following command:
# sqlplus user/pwd@db_name @script.sql
