Hello,
We currently have some SQL code that we call from another BAT file but the log file produced from this process does not have any meaningful information.
For example, we have a command file that has this line:
C:
c:\Oracle\10.2.0\bin\SQLPLUS.EXE UID/PWD@DB @e:\a.sql >e:\a.log
a.sql looks like this:
set heading off
set feedback off
set pagesize 0
set define on
set term off
set echo off
-- define variables
set verify off
define tbl_bstrndtl = 'bstrndtl'
define tbl_bstrnhdr = 'bstrnhdr'
/* start attributes requirements */
set linesize 80
spool e:\a.txt
select
rpad(nvl(a.ACCOUNT_number,' '),10)
|| rpad(to_char(b.effective_date,'mmddyyyy') || ' ',8)
from &tbl_bstrndtl a, &tbl_bstrnhdr b
where a.tran_id = b.tran_id
spool off
exit
The a.log file produced from this process just tells me that a connection was made to Oracle and then it was disconnected.
Could I give a more meaningful output like what was the result of the select and whether it ran successfully or failed with an error?
We currently have some SQL code that we call from another BAT file but the log file produced from this process does not have any meaningful information.
For example, we have a command file that has this line:
C:
c:\Oracle\10.2.0\bin\SQLPLUS.EXE UID/PWD@DB @e:\a.sql >e:\a.log
a.sql looks like this:
set heading off
set feedback off
set pagesize 0
set define on
set term off
set echo off
-- define variables
set verify off
define tbl_bstrndtl = 'bstrndtl'
define tbl_bstrnhdr = 'bstrnhdr'
/* start attributes requirements */
set linesize 80
spool e:\a.txt
select
rpad(nvl(a.ACCOUNT_number,' '),10)
|| rpad(to_char(b.effective_date,'mmddyyyy') || ' ',8)
from &tbl_bstrndtl a, &tbl_bstrnhdr b
where a.tran_id = b.tran_id
spool off
exit
The a.log file produced from this process just tells me that a connection was made to Oracle and then it was disconnected.
Could I give a more meaningful output like what was the result of the select and whether it ran successfully or failed with an error?