How to: Compare the Schemas of Two Databases
By using Team Edition for Database Professionals, you can compare the schema of two databases or of one database and one Visual Studio database project. The entities that you compare are known as the source and the target. When the schema comparison finishes, its results appear in the Schema Compare window. Also, Visual Studio generates a Data Definition Language (DDL) script that you can use to synchronize the different schemas.
After the comparison finishes, you can take other steps:
You can view the structural differences between the two databases. For more information, see.
You can update part or all of the target to match the source. For more information, see.
You can compare the data that resides in the target and the source. For more information, see.
For more information about schema comparison scenarios, see.
To compare the schema of two databases
On the Data menu, point to Schema Compare, and then click New Schema Comparison.
The New Schema Comparison dialog box appears.
Also, the Schema Compare window opens, and Visual Studio automatically assigns it a name such as SchemaCompare1.
Specify the source and the target that you want to compare by clicking Project or Database for each.
You can compare two databases or a database with a database project, but you cannot compare two database projects.
If you clicked Database for the source or the target, connect to the data source by clicking it in the list. If no databases are listed, click New Connection to display the Connection Properties dialog box.
In the Connection Properties dialog box, identify the server on which the source or target resides and the type of authentication to use when you connect to it. Optionally, click a database on that server. When you are finished, click OK.
After you establish a connection, it appears in Server Explorer under Data Connections.
The schema comparison starts.
You can stop a schema comparison operation that is in progress by clicking Stop on the toolbar.