Keeping a SQL Server Database Project and the Actual Database (in SSMS) in sync during development

I am trying to figure out what the normal workflow should be between a SQL Server Database Project and the actual database in SQL Server (SSMS) once they are in sync. The main reason I am using one of these projects is to keep everything in Source Control.

Here are the steps I took to set things up:

  • How can I use LTRIM/RTRIM to search and replace leading/trailing spaces?
  • How to compare the difference for the last row in SQL
  • ASP / SQL - Dates being echoed different to what the database
  • Execute same query twice, but with single different WHERE clause
  • How to populate the dropdown list from sql server database using LinkedHashMap in java
  • Cast Stored Procedure Result as a Table?
    1. Create the actual database and entire schema in SQL Server Management Studio.
    2. Create a new SQL Server Database Project in VS2015.
    3. Right click the project and import the actual database.

    Now that the project is in sync with the actual database, how should I go about making changes going forward? Do I make them in the database project and then republish it or do I make them in the schema? Basically what I am saying is that I am trying to avoid making schema changes during development in both places.

  • How to pull a SQL Table entry based on highest IDENTITY entry and update two columns
  • Which version of SQL Server supports.Net framework 4.5?
  • SQL Date Format
  • How to print date and time from db if record is Null?
  • How do you keep two related, but separate, systems in sync with each other?
  • C# fails to delete database
  • One Solution collect form web for “Keeping a SQL Server Database Project and the Actual Database (in SSMS) in sync during development”

    Generally the best practice will be to make changes to the project, check that into source control, and publish the changes to your database as needed. Your project then becomes your source. You can branch it, merge it, and do whatever else is needed to do your development. You won’t be republishing your database, though. You’ll update your existing one when you publish your project. It will do a diff between your project and the db, then make the appropriate updates/alters to bring your database in line w/ the project.

    I blogged about my experiences with SSDT here:, but there are some other great resources available if you look. There are definitely different ways to do things and what I chose may not fit your environment exactly.

    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.