Deploying to Single Tenant databases

Automated deployment for web applications and databases

Deploying to Single Tenant databases

Postby » Fri May 30, 2014 1:35 pm

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.
Posts: 3
Joined: Thu Aug 08, 2013 5:48 pm

Postby robin » Mon Jun 02, 2014 3:33 pm


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
Deployment Manager
Posts: 20
Joined: Fri Nov 16, 2007 12:02 pm

Return to Deployment Manager

Who is online

Users browsing this forum: No registered users and 0 guests