Re: How to convert an informix database?
Posted in 1996
Topics: Server Administration, Migration, Import/Export & Data Conversion
>Generally Informix provides two ways of exporting data.
>One is called 'unload' which is an SQL command which outputs data
>from an SQL statement to a ascii file which separates columns with a
>pipe ( | ) symbol. This command does not give you the database
>structure, but this can be obtained as a series of SQL commands in an
>ascii file using a command called 'dbschema'.
>The second is a utility called 'dbexport' this produces a series of
>ascii files containing all the data from the database and a script
>file with the data structure.
>If the client has ACE reports (part of the Informix SQL development
>package for versions below 5.0 ) you could write custom reports to
>create 'ascii' files in almost any format, but you would have to write
>a report for every table in the database.
>>The client has had a major "difference of opinion" with the supplier /
>>maintainer of their system and now wishes to move their data over to
>>another system. Obviously being able to read and/or translate the data
>>is a fundamental requirement.
>>The data is currently held on an "Altos" machine running AIX; if possible
>>they would like to convert the data to an MS Access or dBase format.
>Isn't dBase a step backward?
>Basically you can get the data out of Informix no problem, but you
>will need to do some file conversion regardless. This could
>potentially be automated with some UNIX shell scripts. (For example
>to change the file format from Informix unload format to CSV's)
Any step away from Altos is a step forward! Somewhat more seriously,
it seems that I wind up converting data several times a week, if not
most of my waking moments. The conversion to CSV isn't always necessary
as many xbase programs permit you to designate the FS as any value and
you can set the FS in Informix to a comma before unloading, if CSVs are
absolutely required.
I usually use sed or awk to finish the transition. (unzip -a does the
cr/lf translations). All in all, not difficult and, if after
considering the ramifications, the client wants it - the client gets
it :-).