Spooling to Text File - 30 million records - Getting Out of Memory Error
Hi All,
I have an extremely large oracle table that I need to spool to a .txt file. The table has approximately 30 million records. I'm using Toad For Oracle version 10.5 and I'm on Oracle 10g. I've tried running the following spool command a few times and it keeps crashing...I'm getting a "Out of Memory" error in my Toad window when I execute it as a script. Here's the code:
Spool on
set heading off
SET PAGESIZE 0
SET TRIMSPOOL ON
SET LINESIZE 100
set feedback off
set echo off
set termout off
Spool "C:\spooledtext.txt"
select
column1
from test_table
order by
column2,
column1
Spool off;
An ideas as to how I can get this query to spool to a text file without crashing and running out of memory?
Thanks