I have been extracting data from a 4GB oracle 8.1.7 table on to a flatfile.
the script goes like this:
set pause off
--set newpage none
set heading off
set pagesize 0
set concat ~
set feedback off
set verify off
set linesize 1000
set trimspool on
set trimout on
set termout off
column ord noprint
select 0 ord, 'select',null,null,'rtrim('||column_name ||')'
where table_name = upper('&&1')
select column_id ord, '||' , '''|''' , '||' ,'rtrim('||column_name ||')'
where table_name = upper('&1')
and column_id > 1
select 1000 ord, '||' , '''|''' , null, 'from &1;'
order by ord;
The OS is IBM AIX 4.3.3 patch 26. and is also 64 bit.
I invoke this using sqlplus. But at 15mb, the command terminates and when I open the small 15mb file I get eh following error:
ORA-01489 : result of string concatenation is too log.
I don't know whats goin on in this context but, advise you to thru the following thread and see the work arounds in the thread will work.
I think, Its little bit crazy to select 4GB to a flatfile with no breaks. why do you use some where criteria and break it into small files of each 500MB or so if its not the situation of having it on the single flat file.