Re: Informix 2 Oracle databases transfert
Posted in 1995
Etienne Gourdon (etienne@venus.univ-lr.fr) wrote:
: We're using both Oracle V7 and Informix databases.
: We want to transfert Informix databases to Oracle.
: Do you know any procedure concerning this transfert ?
: In fact, we just want to create ORACLE dbimport files
: from INFORMIX dbexport files.
I don't know what Oracle dbimport is, but SQL*Loader can load a ".unl"
file produced by dbexport if you give it a control file of the form:
LOAD DATA
INFILE 'tabname.unl'
INTO TABLE tabname
FIELDS TERMINATED BY "|"
you could create these very simply by running:
for f in `ls *.unl`
do
b=`basename $f`
echo "LOAD DATA">$b.ctl
echo "INFILE '$f'">>$b.ctl
echo INTO TABLE $b>>$b.ctl
echo 'FIELDS TERMINATED BY "|"'>>$b.ctl
done
in your .exp directory.
In practice you would probably want to add various options like reject
file, feedback, INSERT/APPEND/REPLACE/TRUNCATE, readbuffers, direct
load, unrecoverable, parallel load etc., but it's up to you to choose
which options you want in the command line, which in the control file
and modify accordingly.
I'm not sure if SQL*Loader is happy with Informix unload format dates,
so I'll leave that as an exercise for the reader!
I'm also not sure about embedded delimiters (never use 'em!).
You will probably find also that you want to make some schema changes
(eg BLOBs), so you would have to adapt those control files accordingly
as well.
--
graeme
--
Disclaimer: The author's opinions are his own, and not necessarily
those of Pyramid Technology Ltd. or Pyramid Technology Inc.
---------------------------------------------------------------------------
-m------- Graeme Sargent Voice: +44 (0)252 373035
---mmm----- Senior Database Consultant Fax : +44 (0)252 373135
-----mmmmm--- Pyramid Technology Ltd. Telex: Tell who???
-------mmmmmmm- Farnborough, Hants GU14 7PL Email: graeme@pyra.co.uk
---------------------------------------------------------------------------
We have the technology. The tricky bit is learning how to use it.