Microsoft Azure: Updating SQL Database Schema using Visual Studio Schema Compare
Sometimes we need to update the schema of our database that are hosted on Azure, we have some options to do that
- Generate SQL script to update the database and run it from SSMS
This option seems to be the most common used one but it may expose some integrity and data issues. - Using Visual Studio to update the Schema
This one is our option, most of the Visual Studio editions come with a nice feature to compare SQL databases both of Schema and data
You can connect to your Azure database from the server explorer, see below figure
Then run schema compare
Now, we need to make our Azure database the destination and select the source one from which we will update.
We are ready to run the comparison and select the updates we want
Finally, we need to invoke the update button to submit the changes
You can save the comparison if you need to update your database anytime.