I am having trouble logging the sql errors from sqlplus. I am executing a sql script from a bat file using sqlplus with following command: sqlplus dbusrid/dbpass @export_data.sql >> log.log
The script is outputting the results of a select to a csv file using spool as follows:
set echo off
set feedback off
set pagesize 0
set termout off
set heading off
set trimspool on
If a sql error occurs then the output.csv is populated with the error. Is it possible to populate an error log with sql errors instead of or in addition to the output.csv?
Ideally I would like all error output to be logged in the log.log file which is being populated from the bat file cmd mentioned above.
I am new to oracle and sqlplus so Im sorry if this is a trivial question but I cannot seem to find the correct method.