Best Way to Compare Informix Databases
Posted in 1999
Topics: General Discussion
What is the best way to compare two informix databases?
My current approach is to run dbschema on both databases, then diff the output.
However, since diff only does a line-by-line file comparison, one difference
between the databases causes a domino effect in the line-by-line comparison
of the schema output.
Does informix have a built-in tool that would provide a better way?
Any help would be appreciated,
Tim Owens
I have written a small program in 4gl language that translate the numeric codes
that represent the datatypes of columns and scan the Informix systables (tabid > 99
to ignore Informix tables) and join to syscolumns to rebuild a simple dbschema that
I can easily sort. I do the same with indexes and it give good results even if the
DBMS isn't in the same release.
If nobody can help you in a easier way and as far as you can compile 4gl programs
(or if you use SCO Unix 4.2 or 5.0) I can mail you this program.
Tim Owens wrote:
> What is the best way to compare two informix databases?
>
> My current approach is to run dbschema on both databases, then diff the output.
>
> However, since diff only does a line-by-line file comparison, one difference
> between the databases causes a domino effect in the line-by-line comparison
> of the schema output.
>
> Does informix have a built-in tool that would provide a better way?
>
> Any help would be appreciated,
>
> Tim Owens
I wrote a shell script to take each tablename from systables and do a
dbschema on it in alphabetical order. You then do the same for sysprocs to
get the procedures.
This way you have a schema in alpha order that you can reliably diff or
sdiff under Unix.
Another way is to compare systables and syscolumns.
I have had little luck with dbdiff from the IIUG as it is over paranoid
about the names of constraints.
regards Howard
>Tim Owens wrote:
>
>> What is the best way to compare two informix databases?
>>
>> My current approach is to run dbschema on both databases, then diff the
output.
>>
>> However, since diff only does a line-by-line file comparison, one
difference
>> between the databases causes a domino effect in the line-by-line
comparison
>> of the schema output.
>>
>> Does informix have a built-in tool that would provide a better way?
>>
>> Any help would be appreciated,
>>
>> Tim Owens
>
>
>