I have a .sql file that is used as a wrapper file that when executes within sqlplus (188.8.131.52.0), executes a bunch of .sql files within it. Example below:
START D:\Scripts\A.sql "'04-01-2012 00:00:00'"
START D:\Scripts\B.sql "'04-01-2012 00:00:00'"
START D:\Scripts\C.sql "'04-01-2012 00:00:00'"
START D:\Scripts\D.sql "'04-01-2012 00:00:00'"
START D:\Scripts\E.sql "'04-01-2012 00:00:00'"
Each of the .sql file (A,B,C,D,E)
Spools individual output of sql statment within them. Each of the indv .sql file queries different tables with different filters(where) clause.
I would like to capture any error (OS,SQL,DB) into the same indv spool file. The reason being is because later in the process we need to validate if there were any errors before processing and loading the data into our SQL database
This is exactly the same post which you made yesterday in OraFAQ and I already answered there. You need to have SQL*Plus release 11.1 to make the use of sperrorlog defualt error logging table.
Command to make it work is "set errorlogging on;"
Link from Oracle docs : http://docs.oracle.com/cd/B28359_01/server.111/b31189/whatsnew.htm
You can see my demonstations here : http://www.orafaq.com/forum/t/189447/0/