0

Please note that this question is similar but not the same as mine: Is it possible to use MS VS Database Project as a complete solution for database versioning?

I'm trying to work out if there is a way of using the database project to perform versioning of our databases. We have customers in the field who are not modifying our database schema at all (maintained product). What I would like to be able to do is modify the DB project as required during a development cycle and then generate a single change script that will be rolled into my upgrade for our customers.

I was thinking that this will have to be a manual process where I keep a clean snapshot of the previous database version and then generate the deploy script against it before release. The only issue I have with this is that it is a manual process.

Is there something I've missed with the DB project that lets you do this easily? The deploy tool is great but I don't have access to our customer's databases to synchronise them using Visual Studio.

Community
  • 1
  • 1
Spence
  • 28,526
  • 15
  • 68
  • 103

1 Answers1

0

Yes it is possible but it relies on the vsdbcmd utility. You can use the utility even without the full-blown Visual Studio (but it does require some SQL libraries). Google the utility and/or (if you have visual studio) CD to the \Program Files(x86)\Microsoft Visual Studio n.n\VSTSDB\Deploy folder and do a 'vsdbcmd /?' to get the help. The key artifact the utility produces is the .dbschema file (you use 2 of them and the /a:deploy action to do a compare). This only works for schema changes (not data changes which I believe are available in the VS gui). Best of luck.