Deploying to Single Tenant databases

edited June 2, 2014 10:33AM in Deployment Manager
We are using the limited version of Deployment Manager and like what it has to offer. But I am having a problem solving one issue.

We have a structure that supports multiple identical databases in several environments (staging, training etc.) . These environments can have 1-x of these databases all starting with the same prefix but varying endings. (Database_01,Database_03 etc.) I have Jenkins batch scripts to update the base structure and it is working fine since the base structures all have the same name. Is there a way to/or a powershell example that would allow me to cycle through the databases and update the structures. I am calling sqlci.exe in the Jenkins job.

Can I do this using Powershell and the deploy.ps1 module? Any examples of how to setup the deploy.ps1 for database deployment?

Here is a structure example:

Development Environment:
CommonDatabase: Base1
Tenant databases: Database_01,Database_99

Staging Environment:
CommonDatabase: Base1
Tenant databases: Database_01,Database_02,Database_03,Database_99

I hope that is clear

Thanks in advance.


  • Hi,

    You can do this in Deployment Manager by creating a new target within the same environment for each tenant database you wish to deploy to. You would then set the database step for the tenant portion to deploy to all of those targets, setting the variable "RedGateDatabaseName" for each target in that step (you must specify both step and target in the variables table). You do not need to create a deploy.ps1 to deploy a database package, Deployment Manager will recognise a package created by SqlCi and deploy it in a Database Package Step.

    Hope this helps

    Robin Hellen
    Test Engineer
    DLM Automation
Sign In or Register to comment.