The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 11-20-2008
Leo_NN Leo_NN is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 34
SQLPlus spool file

HI

Have some problem with spooling out some relatively large number of records (~2-3 mil)
Small table - OK though.

Getting error: SP2 0308: cannot close spool file.

Any thoughts?



Code:
sqlplus -s user/pwd << EOF 
  set term off
  set head off
  set trims on
  set pages 0
  set feedback off
  set linesize 1000
 
 
      spool test.dat
            select * from small_table; -- OK
            --select * from large_table;  --ERROR
      spool off
  exit 0;
EOF