My company is having me look into switching from our current method of managing the databases that our software uses. We not only need to manage in-office databases, but customer databases across the country. Currently, we have a program which runs various sql scripts to add, remove, and update fields and tables within the databases, but this is starting to get large and cumbersome.
I was tasked with researching SQL Server Database Projects, and as far as creating a new database, it looks great. I cannot, however, find much information on how we might be able to distribute updates to our customers using this (they run their own SQL Servers on site) so that they have the latest tables and schema information to correspond with changes and added functionality in our program. Is there some way built in to do this?
Every time I have looked up updating an existing Database with DB Projects, it says to use schema compare. This is definitely not an option, for various reasons, outside of personal, test databases.
I would suggest you use SqlPackage.exe for deployment on client machines. The general process is: Import existing database into a SQL project. Get this building a .dacpac which contains all the schema changes, plus write pre/post deployment scripts needed to manipulate your data as needed. Then rather than using Schema Compare, use publish for database updates - in VS there's a "Publish" option on the project, while SqlPackage.exe is the command line tool that has matching functionality.
There are two benefits to this approach: