Thursday, March 8, 2012

SQL Schema Compare Tool

When Visual Studio 2010 release it comes with very important tool for SQL.

During development and deployment process required to compare source and destination database. I came across this situation many times for this either we have to remember what we changed in source ( development database) and need to migrate destination when bug fixes or changes uploaded to production.

To access this tool go to “SQL”  from Top menu and go inside schema compare as shown image below.

image_634668213190328845

Now it is self describing.

1. Select “New Schema Comparison”
2. Add Source and Target Database
3. Press Compare. It will display all changed Tables,Stored procedure and other db object.
4. This allow you to generate script for this or if you press “Update” it will update to Target DB.

No comments: