We just trying to implement SSDT in our project.
We have lots of clients for one of our products which is built on a single DB (DBDB) with tables and stored procedures only.
We created one SSDT project for database DBDB
(using VS 2012 > SQL Server object Browser > right click on project > New Project).
Once we build that project it creates one .sql
file.
Problem: if we run that file on client's DBDB - it creates all the tables again & it deletes all records in it [this fulfills the requirements but deletes the existing records :-( ]
What we need: only the update which is not present on the client's DBDB
should get update with new changes.
Note : we have no direct access to client's DBDB
database for comparing with our latest DBDB
. We only can send them some magic script file which will update their DBDB
to the latest state.
It sounds like you may not be pushing the changes correctly. You have a couple of options if you've built a SQL Project.
In any case, it sounds like your publish option might be set to drop and recreate the database each time. I've written quite a few articles on SSDT SQL Projects and getting started that might be helpful here: http://schottsql.blogspot.com/2013/10/all-ssdt-articles.html