Home » SQL & PL/SQL » Client Tools » spool not running from sql script
spool not running from sql script [message #650696] Fri, 29 April 2016 14:11 Go to next message
TorontoTrader
Messages: 8
Registered: January 2007
Junior Member
i am running this following script from sqlplus by using @pathname\scriptfile but the output from the script is not outputting to output.txt. infact the sql script is getting populated in the output.txt
how i can i fix it so my select * from DAILYSTATS_ROWCOUNT gets spooled to file as i wnat to schedule this in a batch job
SET LINES 32000

SET TERMOUT OFF ECHO OFF NEWP 0 SPA 0 PAGES 0 FEED OFF HEAD OFF TRIMS ON TAB OFF
SET MARKUP HTML PREFORMAT ON
SET COLSEP '|'
set pagesize 50000
set heading on
SET SERVEROUTPUT ON
spool e:\scripts\output.txt
select * from DAILYSTATS_ROWCOUNT
spool off
/
Re: spool not running from sql script [message #650697 is a reply to message #650696] Fri, 29 April 2016 14:44 Go to previous message
BlackSwan
Messages: 25795
Registered: January 2009
Location: SoCal
Senior Member
SET TERMOUT OFF ECHO OFF NEWP 0 SPA 0 PAGES 0 FEED OFF HEAD OFF TRIMS ON TAB OFF
SET MARKUP HTML PREFORMAT ON
SET COLSEP '|'
set pagesize 50000
set heading on
SET SERVEROUTPUT ON
spool e:\scripts\output.txt
select * from DAILYSTATS_ROWCOUNT;
spool off
exit

do EXACTLY as above

Please read and follow the forum guidelines, to enable us to help you:
OraFAQ Forum Guide
How to use {code} tags and make your code easier to read
Previous Topic: Drop a hash partition
Next Topic: how to use variables in sql using sqlplus
Goto Forum:
  


Current Time: Thu Jan 18 14:36:07 CST 2018

Total time taken to generate the page: 0.01242 seconds