Hermann.Gruber
Hermann.Gruber

Reputation: 1494

Deploy multiple databases with SSDT

We have an existing system with multiple databases on one SQL Server instance, and we want to deploy database changes using SQL Server Data Tools. Thus I've created a solution with one database project per database.

When I run a build, it creates a .dacpac file for each project. Ideally we want to bundle the deployment of database changes, such that all databases are deployed in one shot. I've seen that database projects can reference other projects and suppose that you can use this mechanism for bundling as well - but I am reluctant to add references just for the sake of deployment.

What is the recommended way to deploy multiple databases in one package?

Upvotes: 3

Views: 2344

Answers (2)

Reem7
Reem7

Reputation: 1

Surprising there isn’t a solid answer to this. I know red gate has sql automate tool, but your company will have to pay for it. Interested if you got a solid answer

Upvotes: 0

Peter Schott
Peter Schott

Reputation: 4726

I don't think you can do this. By default, each database gets its own dacpac. You can set up a script that can build/publish all databases in one shot, but it will do them one at a time. I created a basic batch file some time ago that would build all of the dacpacs and publish each of them in order.

Upvotes: 2

Related Questions