Using Runbooks to run ad-hoc SQL scripts in your database deployment automation pipeline
Blog post from Octopus Deploy
Bob Walker discusses a refined process for executing ad-hoc SQL scripts in automated database deployment pipelines using the Operations Runbooks feature in Octopus Deploy, which he finds more efficient compared to previous methods. The new approach simplifies the complexity of running SQL scripts by automating the submission and execution process while ensuring that any scripts requiring manual intervention, such as those that involve schema changes or affect a significant number of records, are flagged for DBA review. By using Octopus Deploy's runbooks, the process benefits from improved auditing and artifact management, enabling a repeatable and streamlined workflow across different environments without the need for extensive manual steps. Walker highlights the importance of transaction wrapping for script executions and outlines a security model that restricts the editing capabilities of runbooks to DBAs while allowing developers to execute them. He expresses satisfaction with the new process's simplicity and maintainability, noting its potential for further enhancements and compliance with retention policies to maintain audit trails.