Compare database schemas
Posted in 2011
Topics: General Discussion
I am trying to compare the schemas of two databases which 'should' be identical! They are on separate instances, and the only differences should be the sizing of the tables. However, it appears that I am missing constraints in one of the databases. Does a utility exist, or anyone know of a reasonably fast & efficent method of comparing the schemas? Currently I have dumped the schema for both databases & I'm trawling through the diff output :o Any help appreciated. Regards, Andrew Clark
Server Studio has a schema compare functionality that can be very helpful.
My dbschema replacement utility, myschema, has an ordered option (-o) that
sorts objects by name rather than the natural tabid order that dbschema (and
myschema) normally use. This makes using diff a bit easier. Also,
myschema's formatting lends itself to diff-ing better than dbschema does.
Another suggestion, open a very wide terminal window and use sdiff instead
of diff. It produces a side-by-side diff output. Lines in the left file
that are not in the right file and appended with '<'. Lines in the right
file that are not in the left file show prepended with '>'. Lines that are
in both by are somewhat different show with a pipe character '|' between the
versions.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Wed, Oct 5, 2011 at 11:50 AM, ANDREW CLARK <aclark@infinityhealthcare.com
> wrote:
> I am trying to compare the schemas of two databases which 'should' be
> identical! They are on separate instances, and the only differences should
> be
> the sizing of the tables. However, it appears that I am missing constraints
> in
> one of the databases. Does a utility exist, or anyone know of a reasonably
> fast & efficent method of comparing the schemas? Currently I have dumped
> the
> schema for both databases & I'm trawling through the diff output :o Any
> help
> appreciated.
>
> Regards,
>
> Andrew Clark
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--20cf30025a0471261804ae8f42f8
On 05/10/11 16:50, ANDREW CLARK wrote: > I am trying to compare the schemas of two databases which 'should' be > identical! They are on separate instances, and the only differences should be > the sizing of the tables. However, it appears that I am missing constraints in > one of the databases. Does a utility exist, or anyone know of a reasonably > fast& efficent method of comparing the schemas? Currently I have dumped the > schema for both databases& I'm trawling through the diff output :o Any help > appreciated. > > Regards, > > Andrew Clark > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. There are plenty of schema comparison tools in the IIUG software repository. -- Ciao, Marco ______________________________________________________________________________ Marco Greco /UK /IBM Standard disclaimers apply! Structured Query Scripting Language http://www.4glworks.com/sqsl.htm 4glworks http://www.4glworks.com Informix on Linux http://www.4glworks.com/ifmxlinux.htm