Home All Groups Group Topic Archive Search About

Comparing 2 dbs for differences in column definitions

Author
16 Feb 2006 11:23 PM
MittyKom
Hi All

I have 2 dbs, one for prodcution and the other one for development
environment. They are meant to be the same.

Is there a script/way to compare the dbs for any difference in column
datatypes, length. 

This query has what i want to compare:

select
table_name, column_name, data_type, character_maximum_length [Length],
is_nullable [Null], numeric_precision NuPrec, numeric_scale NuScal,
datetime_precision DTPrec

from
information_schema.columns

order by table_name ASC, column_name ASC

Thank you on advance.

Author
16 Feb 2006 11:54 PM
ML
Maybe you should take a look at Red Gate's SQL Compare.
http://www.red-gate.com/


ML

---
http://milambda.blogspot.com/
Author
17 Feb 2006 2:10 PM
JT
See replies to the post "Comparing two databases".

Show quote
"MittyKom" <Mitty***@discussions.microsoft.com> wrote in message
news:844E5968-C506-4A25-A410-2128BA6F2741@microsoft.com...
> Hi All
>
> I have 2 dbs, one for prodcution and the other one for development
> environment. They are meant to be the same.
>
> Is there a script/way to compare the dbs for any difference in column
> datatypes, length.
>
> This query has what i want to compare:
>
> select
> table_name, column_name, data_type, character_maximum_length [Length],
> is_nullable [Null], numeric_precision NuPrec, numeric_scale NuScal,
> datetime_precision DTPrec
>
> from
> information_schema.columns
>
> order by table_name ASC, column_name ASC
>
> Thank you on advance.
>

AddThis Social Bookmark Button