Help needed with informix
Posted in 1995
>I am using INFORMIX-ESQL/C v5.01
>A database has been unloaded using the utility UNLOAD to migrate data to a
new
>database. I want to LOAD these ASCII files into a "new" database.
>Question: Does the database I want to LOAD into have to be completely
empty,
>that is, no pre-existing tables, attributes and data?
>Can the files that the dbschema utility create be modified to migrate this
>data into a database that already has pre-existing data in it?
>Will the LOAD or dbload utility have a problem loading this database with
>existing data or can that be remedied by modifying the dbschema output
file?
>Any and all help would be greatly appreciated.
I know you can get away with modifying the sql file generated by dbexport,
but I have
never tried doing what you are asking. Why don't you try it on a smaller
database and
see what happens?
What you need to note, if you have not already, is that the comments in the
sql script
used to create the new database and load it are read by dbimport and used as
control information.
You will fnd that the loader uses the number of rows info in the comments
and the
name of the .dat file to determine if the file is the correct one generated
by the export
(ie it compares the no. of rows in the comment with the no. of lines in the
file).
Also the dbname is given in the comment at the start of the file.
My suggestion is to try editing out the create table etc statements that you
do not
want, but leave the comments with load information in place and see what
happens.
You might be able to get dbimport to ignore creating the database by
removing the
comment at the start of the file.
Mark Denham
BBC
London, UK
Mark.Denham@bbc.co.uk