Rollback Deployment
VSinha
Posts: 10 New member
in SQL Compare
How can we rollback a deployment through Team City and is there any option to take Backup of database prior to deployment changes?
Tagged:
Comments
To create a backup (more reliable, involves downtime):
If using SQL Compare command line: https://documentation.red-gate.com/display/SC12/Switches+used+in+the+command+line#Switchesusedinthecommandline-/MakeBackup
If using DLM Automation, ReadyRoll or the TeamCity plugin (which uses DLM Automation under the hood) you will need to add an additional pre-deploy step to take a backup.
To generate a roll-back script in advance (but if upgrade fails, rollback script is unlikely to work either):
Try adding a build step before your deployment to call DLM Automation with PowerShell or use SQL Compare command line to generate a rollback script and save it as an artifact before executing the deployment.
DevOps Mentor and Coach
Director of DLM Consultants
Creator of Speaking Mentors
Microsoft Data Platform MVP
Friend of Redgate
Twitter / LinkedIn