Update Database lists in Octopus

Created by Nate Griggs, Modified on Mon, 24 Apr 2023 at 02:48 PM by Nate Griggs

https://octopus.spindlemedia.com/app#/Spaces-1/projects/sql/variables these come from a variable in Octopus 

The variable editor has a list of database names 

Click on the label DatabaseName and you'll see an option called "Open Editor 

You can run this from the master db in prod SQL periodically and then paste it into the variable editor  to update it

image 


SELECT name + '|' + name FROM sys.databases
WHERE name <> 'master'
 ORDER BY name
 

Then have to update the snapshot variables for the project to bring the changes in, just did that and now it shows 

 

Execute SQL Script - Snapshots - Octopus Deploy (spindlemedia.com)

Octopus Deploy