Link to home
Start Free TrialLog in
Avatar of finance_teacher
finance_teacher

asked on

Microsoft SQL 2014 -- compare table SCHEMA structure ?

How can I compare my ONE table named "CUSTOMERS" in my two Microsoft SQL 2014 databases (TEST and PRODUCTION) to see what fields changed ?

Example
 Column Name, DatatypeTEST, DatatypePRODUCTION
  CUSTOMERID, varchar(10), nvarchar(20)
  etc

Maybe something like the below ?
 1. https://solutioncenter.apexsql.com/compare-sql-server-database-schemas-automatically/
 2. https://www.red-gate.com/products/sql-development/sql-compare/
 3. https://www.mssqltips.com/sqlservertip/4824/easy-way-to-compare-sql-server-table-schemas/
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

You can use existing tools like the one from Red Gate or anything paid or free from Apex. This depends on your decision (budget) and it will do the work for you.

BUT, if you are tending to learn something then look at the MSSQL tips web and try to write your own comparison query based the published tips. You may look at this page: https://www.mssqltips.com/sqlservertip/2779/ways-to-compare-and-find-differences-for-sql-server-tables-and-data/

Tablediff utility is also available from Microsoft: https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2012/ms162843(v=sql.110)
and many more tools are listed e.g. here: https://www.mssqltips.com/sqlservertip/1069/sql-server-comparison-tools/
I have been using Red Gate for years and don't want to go back to anything else. Be sure to also look at SQL Data Compare because it is the next one you will want
ASKER CERTIFIED SOLUTION
Avatar of Mark Wills
Mark Wills
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial