Zero Down Time
bernieconway
Posts: 6 New member
We are looking to add zero down time to our deploys. Basically all database column changes will be adds. We are currently using octopus deploy with the "RedGate - Deploy Database Package". Unfortunately the scripts created by this package seem to
1) create a temp table
2) copy data to new table
3) delete old table
4) rename the temp table to the new table name.
This script will not allow us to do zero down time.
Is there another way to use Redgate source control and deploy strategies for zero down time?
Thanks!
1) create a temp table
2) copy data to new table
3) delete old table
4) rename the temp table to the new table name.
This script will not allow us to do zero down time.
Is there another way to use Redgate source control and deploy strategies for zero down time?
Thanks!
Tagged:
Best Answer
-
Ben M Posts: 10 Bronze 2Hey @bernieconway
We now recommend customers try our Pre/Post scripts approach for managing migrations which we recently released - its available on our frequent updates channel of source control ( you just need to opt in to frequent updates)
Take a look here for more info: - https://documentation.red-gate.com/soc6/common-tasks/working-with-pre-post-deployment-scripts
ThanksDevelopment Lead
Redgate Software
Answers
Yes, in some cases you need to write the scripts to deliberately work around some specific scenarios - this could either be handled using pre- and post-deploys or switching to a migration based source control solution, such as SQL Change Automation. (I mean by using the VS extension that was formerly called ReadyRoll INSTEAD of SQL Source Control. You will still use SQL Change Automation for deployment in either case. Redgate recently renamed stuff and now it's way harder to explain this.)
Generally, however, downtime is caused because of dependencies between different systems that need to be upgraded at the same time and the system cannot run while some parts have been deployed and others have not.
In that case you should look at the 'expand-contract' pattern and consider the wider reaching implications for the way your teams work together and co-ordinate your deployments.
You may find these resources valuable:
https://martinfowler.com/bliki/ParallelChange.html
https://medium.com/continuousdelivery/expand-contract-pattern-and-continuous-delivery-of-databases-4cfa00c23d2e
Apologies in advance - this isn't easy.
DevOps Mentor and Coach
Director of DLM Consultants
Creator of Speaking Mentors
Microsoft Data Platform MVP
Friend of Redgate
Twitter / LinkedIn