Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: export dumpfile -> sqlload conversion ?
SET ECHO off
REM --------------------------------------------------------------------------
REM --------------------------------------------------------------------------
REM ---------------------------------------------------------------------------
set tab off
set heading off heading off feedback off echo off verify off space 1
pagesize
0 linesize 120
accept owner prompt 'What schema owns the table to be unloaded?
'
accept table_name prompt 'What table is to be unloaded? '
accept default_precision prompt 'What TOTAL number of digits should be
reserved for numbers without defined precision? '
accept default_scale prompt 'What number of DECIMAL digits should be
reserved for numbers without defined scale? '
--Calculate the sum of all output field lengths and set the output record
size
select 'SET LINESIZE '
|| (sum(decode(data_type, 'CHAR',data_length, 'VARCHAR',data_length, 'VARCHAR2',data_length, 'DATE',14, 'NUMBER',decode(data_precision, '',&default_precision+2,
greatest(data_precision-data_scale,1)+decode(data_scale,0,0,1)+data_scale)+1 ,
'FLOAT',&default_precision+2, data_length)))
rpad('0',greatest(data_precision-data_scale,1),'9') || decode(data_scale,0,'','.')
||
'FLOAT',rpad('0',&default_precision-&default_scale,'9')||'.'||rpad('9',&defa
ult
_scale,'9'),
'ERROR'),40) || ' HEADING ''X'''
spool off
- -- Generate the SQL*Loader control file ---------------------------------------------------------------------------- -
|| decode(data_type, 'CHAR','CHAR('||data_length||')', 'VARCHAR','CHAR('||data_length||')', 'VARCHAR2','CHAR('||data_length||')', 'DATE','DATE(14) "YYYYMMDDHH24MISS"','NUMBER','DECIMAL
'',&default_precision+2,
greatest(data_precision-data_scale,1)+decode(data_scale,0,0,1)+data_scale+1)
||')', 'FLOAT','DECIMALEXTERNAL('||to_char(&default_precision+2)||')', 'ERROR--'||data_type)
|| ' NULLIF ("' ||column_name||'" = BLANKS)'from dba_tab_columns
spool off
- -- Cleanup ---------------------------------------------------------------------------- -
Ronald wrote in message <01HW.B25E7C270009277202447DC0_at_news.wxs.nl>...
>Hi there ! > >we have exp direct=y that's fast >we have sqload direct=y that's fast too > >we don't have imp direct=y that's a pity. > >Has anybody tried to convert the data in the export.dmp file to a format >suitable for sqlload ? I think it could save lots of time since sqlload can >read tables in direct path and in parallel. > >What format is the data in export.dmp in ? When I know that, it should notbe
>too difficult to write a little program to create the control-files and >datafiles. > >Ideas ? comments ? sources ? >-- >Ronald > >--------------------------------------------------------------------------- >mailto:ronr_at_wxs.nl >http://home.wxs.nl/~ronr/RonR.html (last update: june 8th, 1998) >http://www.maccentral.com/news/9804/migration.shtml (forward migrationhome)
> >I think so I mac ! >
begin 666 Yassir Khogaly.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..DMH;V=A;'D[66%S<VER#0I&
M3CI987-S:7(@2VAO9V%L>0T*5$E43$4Z4V5N:6]R($]R86-L92!$0D$-"E1%
M3#M(3TU%.U9/24-%.BLT-"@P*3$X,2 T-C T,#0R#0I414P[0T5,3#M63TE#
M13HK-#0T,3$Y,#8W-S8-"D%$4CM(3TU%.CL[.SM+96YT.SM%;F=L86YD#0I,
M04)%3#M(3TU%.T5.0T]$24Y'/5%53U1%1"U04DE.5$%"3$4Z2V5N=#TP1#TP
M045N9VQA;F0-"E523#IH='1P.B\O=W=W+FMH;V=A;'DN9G)E97-E<G9E+F-O
M+G5K#0I54DPZ:'1T<#HO+W=W=RYA965U+F]R9RYU:PT*14U!24P[4%)%1CM)
M3E1%4DY%5#IY87-S:7) :VAO9V%L>2YF<F5E<V5R=F4N8V\N=6L-"E)%5CHQ
<.3DX,3 S,50R,#(Y,C1:#0I%3D0Z5D-!4D0-"@``
`
end
Received on Sat Oct 31 1998 - 14:29:24 CST
![]() |
![]() |