dbimport
Posted in 2000
Topics: Licensing & Editions, Migration, Import/Export & Data Conversion
I work with Informix Dynamic server Workgroup edition for NT and I've got a
problem. When I want make dbimport database, server breaks with message:
constraint xxxx allready exists. If I erase the name of the constraint in
sql script, procedure dbimport complete successfully or break on another
constraint.
Can I repair database before dbexport procedure, so that dbimport procedure
complete successfully without any special actions in sql script?
Joshua Tree wrote:
> I work with Informix Dynamic server Workgroup edition for NT and I've got a
> problem. When I want make dbimport database, server breaks with message:
> constraint xxxx allready exists. If I erase the name of the constraint in
> sql script, procedure dbimport complete successfully or break on another
> constraint.
>
> Can I repair database before dbexport procedure, so that dbimport procedure
> complete successfully without any special actions in sql script?
This is caused by the engine naming constraints with no explicit name using the
tabid
of the table and then dbexport exports the schema with these automatically
generated
names inserted as explicit names. When you export and import the tabid's may
change causing naming clashes. There are three solutions:
1) Explicitly name all constraints, including NOT NULL constraints before
dbexporting.
2) Edit the dbexport schema file and remove the constraint names so that new
ones
are generated using each table's new tabid.
3) Get my myschema utilility and run it with the '-l' option which will produce
a
schema file compatible with dbimport but without the constraint naming
problems.
Just replace the dbexport schema file with the one myschema produces and
dbimport.
Myschema is contained in the package utils2_ak in the IIUG Software Repository.
Art S. Kagel