You can use system views to query this data. The following example assumes that your databases live on the same server. Essentially, you make a sub-query for each set of table / column / datatype and concatenate them by the name of the table and column. Any differences will be confirmed NULL on both sides of the connection. If you really want to get smarter, you can add a flag column to test for data types. Personally, I would take this data and copy it to Excel for easy sorting / viewing.
select
a.prod_table,
a.prod_column,
a.prod_column_datatype,
b.dev_table,
b.dev_column,
b.dev_column_datatype
from
(select
t1.name prod_table,
c1.name prod_column,
dt1.name prod_column_datatype
from
prod.sys.tables t1
join prod.sys.columns c1 on (t1.object_id = c1.object_id)
join prod.sys.types dt1 on (c1.system_type_id = dt1.system_type_id)) a
full outer join
(select
t2.name dev_table,
c2.name dev_column,
dt2.name dev_column_datatype
from
prod.sys.tables t2
join prod.sys.columns c2 on (t2.object_id = c2.object_id)
join prod.sys.types dt2 on (c2.system_type_id = dt2.system_type_id)) b
on (a.prod_table = b.dev_table and
a.prod_column = b.dev_column)
order by
a.prod_table,
a.prod_column,
b.dev_table,
b.dev_column
source
share