Reputation: 3697
Multitenant system with several dbs sharing the same schema. Dev and test environments have multiple example tenants. Db schema maintained in SSDT/SQL Project in VS2k13.
What would be the easiest way of publishing to all DBs from within VS automatically?
Upvotes: 0
Views: 328
Reputation: 6856
The easiest is to create a batch file or powershell script that calls sqlpackage.exe using the /Action:Script and the dacpac which is the output from your project as the /SourceFile and each database as the /TargetConnectionString
Have one line in the batch for each database.
The recommended (my recommendation anyway) is to have a CI server like TeamCity or Tfs which monitors for check-ins and then when a check-in happens:
If you publish from visual studio you don't have the strict process of:
Ed
Upvotes: 5