SlideShare a Scribd company logo
BUILDING AN AUTOMATED DATABASE
DEPLOYMENT PIPELINE
Grant Fritchey
Red Gate Software
Continuous delivery for databases
Goals
๏‚ง Understand the technology and process
requirements to work towards automation step-
by-step in your release pipeline.
๏‚ง Learn about the organizational changes
necessary to support process modifications.
๏‚ง Appreciate why these changes are necessary in
support of modern development and
deployment methodologies.
grant@scarydba.com www.scarydba.com
@gfritchey www.linkedin.com/in/scarydba
Grant Fritchey
Product Evangelist, Red Gate Software
ALM โ€“ and where the database fits in
Three core processes in Application Lifecycle Management:
Governance Development Operations
Natural friction across pipeline
Development โ†’ Operations
Building an Automated Database Deployment Pipeline
Natural friction across pipeline
Development โ†’ Operations
Operations โ†’ Development
Why?
Development focus is on speed
๏‚ง Agile
๏‚ง Scrum
๏‚ง Lean
๏‚ง Feature-driven Development
๏‚ง Iterative
Operations focus is on production protectionprotection
๏‚ง Monitoring
๏‚ง Deployment
๏‚ง Integrity
๏‚ง Data Management
Databases as a bottleneck โ€“ historically
Odd languages
๏‚ง SQL
๏‚ง Cubes
๏‚ง X-Query
3 reasons why databases have traditionally slowed down
deployments:
Data persistence
๏‚ง Data outlives
applications
๏‚ง Data canโ€™t be
replaced
DBA paranoia
๏‚ง Franklyโ€ฆ
1 2 3
A quick primer on continuous delivery
Common misconception: itโ€™s about automating to Production
Building an Automated Database Deployment Pipeline
A quick primer on continuous delivery
Common misconception: itโ€™s about automating to Production
In fact โ€“
thereโ€™s a difference between three continuous approaches:
Development
Source
control CI server Test Production
Continuous integration
Continuous deployment
Continuous delivery
The goals of continuous delivery for
databases
๏‚ง Faster feedback on changes made
o Continuously integrate team changes
o Automated testing
o Releases rehearsed in testing environments before
deployed to Production
= repeatability, repeatability and
a strong team process for changes
Focus on the pipeline
Think of the Toyota production systemโ€ฆ
๏‚ง Start with Lean
o Focus on the customer, eliminate waste
o Continuously Improve
o Empower the team
o Optimize the whole
o Plan for change
o Automate processes
o Build quality in
SOURCE
CONTROL
CONTINUOUS
INTEGRATION:
FUNDAMENTALS
CONTINUOUS
INTEGRATION:
ADVANCED
AUTOMATED
DEPLOYMENT
Four key stages of the deployment pipeline
SOURCE
CONTROL
๏‚ง Greenfields
๏‚ง Existing systems
๏‚ง Test data
Four key stages of the deployment pipeline
๏‚ง Automate builds as first step
o Incremental
o Complete
๏‚ง Build library of manual tests
๏‚ง Automate testsCONTINUOUS
INTEGRATION:
FUNDAMENTALS
Four key stages of the deployment pipeline
๏‚ง Select CI tooling
๏‚ง Team discipline
๏‚ง Customization of build steps
๏‚ง Automate the testingCONTINUOUS
INTEGRATION:
ADVANCED
Four key stages of the deployment pipeline
๏‚ง Testing
๏‚ง Automation
๏‚ง Safety
o Backups
o Rollback strategyAUTOMATED
DEPLOYMENT
Four key stages of the deployment pipeline
Create development environment
for automation
Empower Development
๏‚ง Environment should let them work at their speed
Take part in Development
๏‚ง Instead of stopping bad deployments, stop bad development
Automate your build process
๏‚ง Supply clean production data or supply good sample data
Get started on writing tests
๏‚ง Build your library
Different types of testing for different stages of the pipeline:
Development
Integration
Testing QA
Pre-Production/
Staging Production
Automate testing
Unit tests Integration tests
Automated tests
Deployment validation
Behaviour validation
Other validations
B C D
A
Always Be Continuously Delivering
Deliver
Every delivery is practice
Fail faster
๏‚ง But less frequently
๏‚ง Smooth the process
Testing, testing, testing
๏‚ง Select the right tests for each stage
๏‚ง Review and act on the results
Automate
DBAs must work with Devsโ€ฆ
Yes, you must protect the data for the business, but
that must be tempered with helping deliver functionality.
Changes to philosophy
Devs must work with DBAsโ€ฆ
Yes, you may know more about business needs,
so educate rather than isolate.
Changes to philosophy
Project Management must think of operations as part
of developmentโ€ฆ
Yes:
๏‚ง Deployment is part of development
๏‚ง Release 1.1 and on are part of development
o And planning for 1.1 is not premature optimization
๏‚ง Data retention is part of development
Changes to philosophy
Changes to workplace
SOURCE
CONTROL
CONTINUOUS
INTEGRATION:
FUNDAMENTALS
CONTINUOUS
INTEGRATION:
ADVANCED
AUTOMATED
DEPLOYMENT
Changes to workplace for continuous
database delivery
๏‚ง Empower developers to do more
๏‚ง Bring DBAs into development teams
๏‚ง Management must buy-in
๏‚ง Management must get out of the way
How are other companies getting started?
Case Study: Boxon
๏‚ง Global packaging and labelling company
๏‚ง Based in Sweden; sub-division in China
๏‚ง Three business areas: profitable packing
solutions; intelligent marking; customized
big-bags solutions for bulk handling
๏‚ง One developer responsible for ASP.NET
application with SQL Server backend,
enabling customers to control consistent
printing of labels wherever the print shop
is located in the world
Boxon โ€“ Initial Process
๏‚ง Deploying to production was scaryโ€ฆ
๏‚ง Database changes not version-
controlled
๏‚ง 2-hour window - at night - to
complete deployments to production
โ€“ difficult to find quiet period with a
global customer base
PAIN
POINTS
Boxon โ€“ Improved Process
๏‚ง Deployments are less scary nowโ€ฆ
๏‚ง Tickets are logged and prioritized in Unfuddle
(unfuddle.com)
๏‚ง Ticket numbers are logged in SVN and
TeamCity to track items
๏‚ง Now use SQL Source Control and Subversion
to version DB changes
o Source of authority on database build
๏‚ง TeamCity (CI build server) is triggered on
check-in of changes
o Fast response โ€“ changes checked in frequently
๏‚ง Notification if build fails
๏‚ง Build packaged into a Nuget file for deployment
BUILDING A
PIPELINE
Case Study: Move with Us
๏‚ง Risk management solution and
sales and marketing channel
provider for residential property
businesses in the UK
๏‚ง Located near Cambridge, UK
๏‚ง Customers put a heavy load on
databases, so updates need to
be efficient
Move with Us โ€“ Initial Process
๏‚ง Database code often not checked in
to VCS due to risk of conflicts โ€“
changes were communicated by
email instead
๏‚ง Hot fixes sometimes done directly
on integration server
๏‚ง 1 day needed to release updates โ€“
a lot of work in building and testing
๏‚ง Problems with merging code led to
a lot of firefighting
PAIN
POINTS
Move with Us โ€“ Improved Process
๏‚ง Each developer has a local copy of database
๏‚ง SQL Source Control and Subversion used to
check in database changes to version control
๏‚ง TeamCity (CI build server) automatically
compiles changes on check-in
๏‚ง Successful builds packaged into a Nuget file
automatically
o Fast getting here โ€“ multiple database changes
checked in per day
๏‚ง Nuget package deployed to Test on demand
๏‚ง If problems detected, return to Dev to fix
BUILDING A
PIPELINE
Case Study: Practice Fusion
๏‚ง Web-based electronic health record
(EHR) company
๏‚ง Founded in 2005
๏‚ง Based in San Francisco
๏‚ง Hosts over 50 million patient records
๏‚ง Used in all 50 states and by 150k+
physicians
๏‚ง 3 DBA engineers; 1 data architect;
10+ developers
Practice Fusion โ€“ Initial Process
๏‚ง Hand-crafted SQL scripts - inconsistent
๏‚ง Database changes not always version
controlled
๏‚ง Changes released by opening dozens
of files in SSMS
๏‚ง Long-winded team comms if further
changes needed
๏‚ง Smoke-testing deployments showed
some objects had been deployed
straight to Prod and werenโ€™t in
deployment script
PAIN
POINTS
Practice Fusion โ€“ Improved Process
๏‚ง SQL Source Control and Subversion to
version DB changes
o Source of authority on database build
๏‚ง Jenkins (CI build server) is triggered on
check-in of changes
o More time to develop; less time managing scripts
๏‚ง Build failed by Jenkins if problems detected
o Fewer issues deploying to production
๏‚ง Jenkins, SQL Compare and SQL Data
Compare used to deploy changes to
environments
๏‚ง Custom scripts for replication
BUILDING A
PIPELINE
Summary
๏‚ง Eliminate or mitigate friction
o Slow is smooth, smooth is
fast
๏‚ง Adopt lean methodologies
and focus
๏‚ง Four key stages
o Source control
o Build automation
o Continuous Integration
o Continous Deployment
๏‚ง A-B-C-D
๏‚ง Change your philosophy
๏‚ง Change your workplace
Goals
๏‚ง Understand the technology and process
requirements to work towards automation step-
by-step in your release pipeline.
๏‚ง Learn about the organizational changes
necessary to support process modifications.
๏‚ง Appreciate why these changes are necessary in
support of modern development and
deployment methodologies.
Documentation and resources
๏‚ง Continuous Delivery by Jez Humble and David Farley (Addison Wesley)
๏‚ง The Phoenix Project: A Novel About IT, DevOps, and Helping Your Business Win by
Gene Kim, Kevin Behr and George Spafford (IT Revolution Press)
๏‚ง The Goal: A Process of Ongoing Improvement by Eliyahu M. Goldratt and Jeff Cox
(Gower Publishing Ltd.)
๏‚ง Agile Organization by the agile admin (theagileadmin.com)
Further resources:
๏‚ง Database Delivery Learning program: www.red-gate.com/delivery
o Patterns and practices on Simple-Talk
o Tutorials in Red Gate training academy
๏‚ง www.youtube.com/user/RedGateVideos - for recorded seminars
Image sources
Author Source Information
Chiltepinster Wikimedia Commons Mocking Bird Argument.jpg โ€“ Wikimedia Commons. This file is licensed under the Creative Commons Attribution-Share Alike
3.0 Unported license. Source on Wikimedia Commons: โ€œOwn workโ€
Tableatny Wikimedia Commons Athlete at Starting block.jpg โ€“ Wikimedia Commons. This file is licensed under the Creative Commons Attribution 2.0 Generic
license. Source on Wikimedia Commons: โ€œBXP135671โ€
n.raveender Wikimedia Commons Stop No Entry.jpg โ€“ Wikimedia Commons. This file is in the public domain. Source on Wikimedia Commons: โ€œOwn work.โ€
Original uploader was Liface
at en.wikipedia
Wikimedia Commons Cross Country US.jpg โ€“ Wikimedia Commons. This file is licensed under the Creative Commons Attribution-Share Alike 3.0
Unported license. Source on Wikimedia Commons: โ€œTransferred from en.wikipedia; transfer was stated to be made by
User:TFCforever.โ€ Notes on license: Liface at the English language Wikipedia, the copyright holder of this work, hereby
publishes it under the following license:GNU head Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software
Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
Subject to disclaimers.
Horia Varlan Flickr Graduated cylinders and beaker filled with chemical compounds โ€“ Flickr. This file is licensed under the Creative Commons
Attribution 2.0 Generic license.
Henry Mรผhlpfordt Flickr CERN Atlas Control Room 2010-07-01 โ€“ Flickr. This file is licensed under the Creative Commons Attribution-ShareAlike 2.0
Generic license.
Department for Business,
Innovation and Skills
Flickr Toyotaโ€™s new Auris โ€“ Flickr. This file is licensed under the Creative Commons Attribution-NoDerivs 2.0 Generic license.
Qrodo Photos Flickr Sport Action โ€“ Fencing โ€“ Flickr. This file is licensed under the Creative Commons Attribution 2.0 Generic license.
William Warby Flickr Gears โ€“ Flickr. This file is licensed under the Creative Commons Attribution 2.0 Generic license.

More Related Content

What's hot (20)

PDF
Continuous Delivery Distilled
Matt Callanan
ย 
PDF
DevOps and the Case for ROI to Executives
IBM UrbanCode Products
ย 
PPTX
The Challenges & Pitfalls of Database Continuous Delivery
Perforce
ย 
PPTX
Continuous Delivery
Mike McGarr
ย 
PDF
Why source control your Oracle Database?
Red Gate Software
ย 
PPTX
Challenges and best practices of database continuous delivery
DBmaestro - Database DevOps
ย 
PDF
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
RapidValue
ย 
PPTX
Qa in CI/CD
Adsmurai
ย 
PDF
"DevOps > CI+CD "
Innovation Roots
ย 
PPTX
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Simplilearn
ย 
PDF
Microsoft SQL Server Continuous Integration
Mark Ginnebaugh
ย 
PPTX
Introduction to Continuous Delivery (BBWorld/DevCon 2013)
Mike McGarr
ย 
PPT
How to Build a DevOps Toolchain
IBM UrbanCode Products
ย 
PPTX
Transforming Organizations with CI/CD
Cprime
ย 
PPTX
An introduction to DevOps
Alexander Meijers
ย 
PPTX
#ATATalk - Episode 1 : Session on Selenium Exceptions by Pallavi Sharma
Agile Testing Alliance
ย 
PPTX
From Continuous Integration to Continuous Delivery and DevOps
Luca Minudel
ย 
PPTX
Devops online training ppt
KhalidQureshi31
ย 
PPTX
Automate Database Deployment - SQL In The City Workshop
Red Gate Software
ย 
PDF
Devops at SlideShare: Talk at Devopsdays Bangalore 2011
Kapil Mohan
ย 
Continuous Delivery Distilled
Matt Callanan
ย 
DevOps and the Case for ROI to Executives
IBM UrbanCode Products
ย 
The Challenges & Pitfalls of Database Continuous Delivery
Perforce
ย 
Continuous Delivery
Mike McGarr
ย 
Why source control your Oracle Database?
Red Gate Software
ย 
Challenges and best practices of database continuous delivery
DBmaestro - Database DevOps
ย 
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
RapidValue
ย 
Qa in CI/CD
Adsmurai
ย 
"DevOps > CI+CD "
Innovation Roots
ย 
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Simplilearn
ย 
Microsoft SQL Server Continuous Integration
Mark Ginnebaugh
ย 
Introduction to Continuous Delivery (BBWorld/DevCon 2013)
Mike McGarr
ย 
How to Build a DevOps Toolchain
IBM UrbanCode Products
ย 
Transforming Organizations with CI/CD
Cprime
ย 
An introduction to DevOps
Alexander Meijers
ย 
#ATATalk - Episode 1 : Session on Selenium Exceptions by Pallavi Sharma
Agile Testing Alliance
ย 
From Continuous Integration to Continuous Delivery and DevOps
Luca Minudel
ย 
Devops online training ppt
KhalidQureshi31
ย 
Automate Database Deployment - SQL In The City Workshop
Red Gate Software
ย 
Devops at SlideShare: Talk at Devopsdays Bangalore 2011
Kapil Mohan
ย 

Viewers also liked (20)

PPTX
DevOps in your Oracle Stack
Timothy Krupinski
ย 
PPTX
Edition Based Redefinition - Continuous Database Application Evolution with O...
Lucas Jellema
ย 
PDF
Using puppet to leverage DevOps in Large Enterprise Oracle Environments
Bert Hajee
ย 
PPTX
Brk3043 azure sql db intelligent cloud database for app developers - wash dc
Bob Ward
ย 
PPTX
Brk3288 sql server v.next with support on linux, windows and containers was...
Bob Ward
ย 
PPTX
Gs08 modernize your data platform with sql technologies wash dc
Bob Ward
ย 
PDF
Gitora, Version Control for PL/SQL
Gerger
ย 
PDF
ckitterman resume
craig kitterman
ย 
PPT
Twenty is Plenty
Bob Ward
ย 
PPTX
SQL Server R Services: What Every SQL Professional Should Know
Bob Ward
ย 
DOCX
Accounting concepts
Mohamed Etman
ย 
PPTX
Actividad 2
Mary Tere Villanueva
ย 
PPTX
Actividad 5 (1)
Mary Tere Villanueva
ย 
PPTX
Inside SQL Server In-Memory OLTP
Bob Ward
ย 
PDF
indian standard for Hard-Drawn Copper Conductors for Over Head Power Transmis...
Chirag vasava
ย 
PDF
Gitora, Version Control for PL/SQL
Gerger
ย 
DOCX
3. linux installation
kris harden
ย 
PPTX
Privacidad, seguridad y protecciรณn online
Patricia Antenucci
ย 
DOC
Copper conductor
Chirag vasava
ย 
PPTX
Cast/Actors
AshleyC__
ย 
DevOps in your Oracle Stack
Timothy Krupinski
ย 
Edition Based Redefinition - Continuous Database Application Evolution with O...
Lucas Jellema
ย 
Using puppet to leverage DevOps in Large Enterprise Oracle Environments
Bert Hajee
ย 
Brk3043 azure sql db intelligent cloud database for app developers - wash dc
Bob Ward
ย 
Brk3288 sql server v.next with support on linux, windows and containers was...
Bob Ward
ย 
Gs08 modernize your data platform with sql technologies wash dc
Bob Ward
ย 
Gitora, Version Control for PL/SQL
Gerger
ย 
ckitterman resume
craig kitterman
ย 
Twenty is Plenty
Bob Ward
ย 
SQL Server R Services: What Every SQL Professional Should Know
Bob Ward
ย 
Accounting concepts
Mohamed Etman
ย 
Actividad 2
Mary Tere Villanueva
ย 
Actividad 5 (1)
Mary Tere Villanueva
ย 
Inside SQL Server In-Memory OLTP
Bob Ward
ย 
indian standard for Hard-Drawn Copper Conductors for Over Head Power Transmis...
Chirag vasava
ย 
Gitora, Version Control for PL/SQL
Gerger
ย 
3. linux installation
kris harden
ย 
Privacidad, seguridad y protecciรณn online
Patricia Antenucci
ย 
Copper conductor
Chirag vasava
ย 
Cast/Actors
AshleyC__
ย 
Ad

Similar to Building an Automated Database Deployment Pipeline (20)

PPTX
Database Deployment Pipeline - SQL In The City Workshop 2014
Red Gate Software
ย 
PDF
Using Lean Thinking to identify and address Delivery Pipeline bottlenecks
Sanjeev Sharma
ย 
PPTX
Dev ops culture and practices
AnkaraCloud
ย 
PPTX
Webinar - Devops platform for the evolving enterprise
DBmaestro - Database DevOps
ย 
PPTX
Agile & DevOps - It's all about project success
Adam Stephensen
ย 
PDF
DataOps , cbuswaw April '23
Jason Packer
ย 
PDF
Dev ops in agile - 1st Conference Melbourne
Mirco Hering
ย 
PDF
Using Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks
IBM UrbanCode Products
ย 
PDF
DataOps, DevOps and the Developer: Treating Database Code Just Like App Code
DevOps.com
ย 
PDF
Pivotal korea transformation_strategy_seminar_enterprise_dev_ops_20160630_v1.0
minseok kim
ย 
PPTX
DevOps and Build Automation
Heiswayi Nrird
ย 
PPT
Continous integration-leon-kehl-2010
Kitchener-Waterloo Agile
ย 
PDF
DevOps and Application Delivery for Hybrid Cloud - DevOpsSummit session
Sanjeev Sharma
ย 
PPTX
What is DevOps?
Mesut GรผneลŸ
ย 
PPTX
Enterprise DevOps: Scaling Build, Deploy, Test, Release
IBM UrbanCode Products
ย 
PPT
P4 Branching Overview
Go2Group, Inc.
ย 
PDF
[WSO2Con EU 2017] Continuous Integration, Delivery and Deployment: Accelerate...
WSO2
ย 
PPTX
Fllow con 2014
gbgruver
ย 
PDF
Agile webinar pack (2)
Basis Technologies
ย 
PPTX
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
DevOps Enterprise Summmit
ย 
Database Deployment Pipeline - SQL In The City Workshop 2014
Red Gate Software
ย 
Using Lean Thinking to identify and address Delivery Pipeline bottlenecks
Sanjeev Sharma
ย 
Dev ops culture and practices
AnkaraCloud
ย 
Webinar - Devops platform for the evolving enterprise
DBmaestro - Database DevOps
ย 
Agile & DevOps - It's all about project success
Adam Stephensen
ย 
DataOps , cbuswaw April '23
Jason Packer
ย 
Dev ops in agile - 1st Conference Melbourne
Mirco Hering
ย 
Using Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks
IBM UrbanCode Products
ย 
DataOps, DevOps and the Developer: Treating Database Code Just Like App Code
DevOps.com
ย 
Pivotal korea transformation_strategy_seminar_enterprise_dev_ops_20160630_v1.0
minseok kim
ย 
DevOps and Build Automation
Heiswayi Nrird
ย 
Continous integration-leon-kehl-2010
Kitchener-Waterloo Agile
ย 
DevOps and Application Delivery for Hybrid Cloud - DevOpsSummit session
Sanjeev Sharma
ย 
What is DevOps?
Mesut GรผneลŸ
ย 
Enterprise DevOps: Scaling Build, Deploy, Test, Release
IBM UrbanCode Products
ย 
P4 Branching Overview
Go2Group, Inc.
ย 
[WSO2Con EU 2017] Continuous Integration, Delivery and Deployment: Accelerate...
WSO2
ย 
Fllow con 2014
gbgruver
ย 
Agile webinar pack (2)
Basis Technologies
ย 
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
DevOps Enterprise Summmit
ย 
Ad

More from Grant Fritchey (20)

PDF
You Need a PostgreSQL Restore Plan Presentation
Grant Fritchey
ย 
PDF
PostgreSQL Query Performance Monitoring for the Absolute Beginner
Grant Fritchey
ย 
PDF
Leveraging AI for the PostgreSQL DBA #pgconf.eu
Grant Fritchey
ย 
PDF
Exploring Execution Plans, Learning to Read SQL Server Execution Plans
Grant Fritchey
ย 
PPTX
SQL Server Performance Tuning: Common Problems, Possible Solutions
Grant Fritchey
ย 
PDF
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
ย 
PPTX
Migrating To PostgreSQL
Grant Fritchey
ย 
PPTX
PostgreSQL Performance Problems: Monitoring and Alerting
Grant Fritchey
ย 
PDF
Automating Database Deployments Using Azure DevOps
Grant Fritchey
ย 
PDF
Learn To Effectively Use Extended Events_Techorama.pdf
Grant Fritchey
ย 
PDF
Using Query Store to Understand and Control Query Performance
Grant Fritchey
ย 
PPTX
You Should Be Standing Here: Learn How To Present a Session
Grant Fritchey
ย 
PDF
Redgate Community Circle: Tools For SQL Server Performance Tuning
Grant Fritchey
ย 
PDF
10 Steps To Global Data Compliance
Grant Fritchey
ย 
PDF
Time to Use the Columnstore Index
Grant Fritchey
ย 
PDF
Introduction to SQL Server in Containers
Grant Fritchey
ย 
PDF
DevOps for the DBA
Grant Fritchey
ย 
PDF
SQL Injection: How It Works, How to Stop It
Grant Fritchey
ย 
PDF
Privacy and Protection in the World of Database DevOps
Grant Fritchey
ย 
PDF
SQL Server Tools for Query Tuning
Grant Fritchey
ย 
You Need a PostgreSQL Restore Plan Presentation
Grant Fritchey
ย 
PostgreSQL Query Performance Monitoring for the Absolute Beginner
Grant Fritchey
ย 
Leveraging AI for the PostgreSQL DBA #pgconf.eu
Grant Fritchey
ย 
Exploring Execution Plans, Learning to Read SQL Server Execution Plans
Grant Fritchey
ย 
SQL Server Performance Tuning: Common Problems, Possible Solutions
Grant Fritchey
ย 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
ย 
Migrating To PostgreSQL
Grant Fritchey
ย 
PostgreSQL Performance Problems: Monitoring and Alerting
Grant Fritchey
ย 
Automating Database Deployments Using Azure DevOps
Grant Fritchey
ย 
Learn To Effectively Use Extended Events_Techorama.pdf
Grant Fritchey
ย 
Using Query Store to Understand and Control Query Performance
Grant Fritchey
ย 
You Should Be Standing Here: Learn How To Present a Session
Grant Fritchey
ย 
Redgate Community Circle: Tools For SQL Server Performance Tuning
Grant Fritchey
ย 
10 Steps To Global Data Compliance
Grant Fritchey
ย 
Time to Use the Columnstore Index
Grant Fritchey
ย 
Introduction to SQL Server in Containers
Grant Fritchey
ย 
DevOps for the DBA
Grant Fritchey
ย 
SQL Injection: How It Works, How to Stop It
Grant Fritchey
ย 
Privacy and Protection in the World of Database DevOps
Grant Fritchey
ย 
SQL Server Tools for Query Tuning
Grant Fritchey
ย 

Recently uploaded (20)

PDF
OpenChain Webinar - AboutCode - Practical Compliance in One Stack โ€“ Licensing...
Shane Coughlan
ย 
PDF
Best Software Development at Best Prices
softechies7
ย 
PDF
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
ย 
PDF
Designing Accessible Content Blocks (1).pdf
jaclynmennie1
ย 
PDF
Writing Maintainable Playwright Tests with Ease
Shubham Joshi
ย 
PPTX
IDM Crack with Internet Download Manager 6.42 [Latest 2025]
HyperPc soft
ย 
PDF
From Data Preparation to Inference: How Alluxio Speeds Up AI
Alluxio, Inc.
ย 
PDF
capitulando la keynote de GrafanaCON 2025 - Madrid
Imma Valls Bernaus
ย 
PPTX
IObit Driver Booster Pro Crack Download Latest Version
chaudhryakashoo065
ย 
PDF
Rewards and Recognition (2).pdf
ethan Talor
ย 
PDF
Automated Test Case Repair Using Language Models
Lionel Briand
ย 
PDF
Automated Testing and Safety Analysis of Deep Neural Networks
Lionel Briand
ย 
PPTX
Wondershare Filmora Crack 14.5.18 + Key Full Download [Latest 2025]
HyperPc soft
ย 
PPTX
Android Notifications-A Guide to User-Facing Alerts in Android .pptx
Nabin Dhakal
ย 
PDF
Best Practice for LLM Serving in the Cloud
Alluxio, Inc.
ย 
PPTX
IObit Uninstaller Pro 14.3.1.8 Crack Free Download 2025
sdfger qwerty
ย 
PDF
Mastering VPC Architecture Build for Scale from Day 1.pdf
Devseccops.ai
ย 
PPTX
IObit Driver Booster Pro 12.4-12.5 license keys 2025-2026
chaudhryakashoo065
ย 
PDF
Why Edge Computing Matters in Mobile Application Tech.pdf
IMG Global Infotech
ย 
PDF
AWS Consulting Services: Empowering Digital Transformation with Nlineaxis
Nlineaxis IT Solutions Pvt Ltd
ย 
OpenChain Webinar - AboutCode - Practical Compliance in One Stack โ€“ Licensing...
Shane Coughlan
ย 
Best Software Development at Best Prices
softechies7
ย 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
ย 
Designing Accessible Content Blocks (1).pdf
jaclynmennie1
ย 
Writing Maintainable Playwright Tests with Ease
Shubham Joshi
ย 
IDM Crack with Internet Download Manager 6.42 [Latest 2025]
HyperPc soft
ย 
From Data Preparation to Inference: How Alluxio Speeds Up AI
Alluxio, Inc.
ย 
capitulando la keynote de GrafanaCON 2025 - Madrid
Imma Valls Bernaus
ย 
IObit Driver Booster Pro Crack Download Latest Version
chaudhryakashoo065
ย 
Rewards and Recognition (2).pdf
ethan Talor
ย 
Automated Test Case Repair Using Language Models
Lionel Briand
ย 
Automated Testing and Safety Analysis of Deep Neural Networks
Lionel Briand
ย 
Wondershare Filmora Crack 14.5.18 + Key Full Download [Latest 2025]
HyperPc soft
ย 
Android Notifications-A Guide to User-Facing Alerts in Android .pptx
Nabin Dhakal
ย 
Best Practice for LLM Serving in the Cloud
Alluxio, Inc.
ย 
IObit Uninstaller Pro 14.3.1.8 Crack Free Download 2025
sdfger qwerty
ย 
Mastering VPC Architecture Build for Scale from Day 1.pdf
Devseccops.ai
ย 
IObit Driver Booster Pro 12.4-12.5 license keys 2025-2026
chaudhryakashoo065
ย 
Why Edge Computing Matters in Mobile Application Tech.pdf
IMG Global Infotech
ย 
AWS Consulting Services: Empowering Digital Transformation with Nlineaxis
Nlineaxis IT Solutions Pvt Ltd
ย 

Building an Automated Database Deployment Pipeline

  • 1. BUILDING AN AUTOMATED DATABASE DEPLOYMENT PIPELINE Grant Fritchey Red Gate Software Continuous delivery for databases
  • 2. Goals ๏‚ง Understand the technology and process requirements to work towards automation step- by-step in your release pipeline. ๏‚ง Learn about the organizational changes necessary to support process modifications. ๏‚ง Appreciate why these changes are necessary in support of modern development and deployment methodologies.
  • 4. ALM โ€“ and where the database fits in Three core processes in Application Lifecycle Management: Governance Development Operations
  • 5. Natural friction across pipeline Development โ†’ Operations
  • 7. Natural friction across pipeline Development โ†’ Operations Operations โ†’ Development Why?
  • 9. ๏‚ง Agile ๏‚ง Scrum ๏‚ง Lean ๏‚ง Feature-driven Development ๏‚ง Iterative
  • 10. Operations focus is on production protectionprotection
  • 11. ๏‚ง Monitoring ๏‚ง Deployment ๏‚ง Integrity ๏‚ง Data Management
  • 12. Databases as a bottleneck โ€“ historically Odd languages ๏‚ง SQL ๏‚ง Cubes ๏‚ง X-Query 3 reasons why databases have traditionally slowed down deployments: Data persistence ๏‚ง Data outlives applications ๏‚ง Data canโ€™t be replaced DBA paranoia ๏‚ง Franklyโ€ฆ 1 2 3
  • 13. A quick primer on continuous delivery Common misconception: itโ€™s about automating to Production
  • 15. A quick primer on continuous delivery Common misconception: itโ€™s about automating to Production In fact โ€“ thereโ€™s a difference between three continuous approaches: Development Source control CI server Test Production Continuous integration Continuous deployment Continuous delivery
  • 16. The goals of continuous delivery for databases ๏‚ง Faster feedback on changes made o Continuously integrate team changes o Automated testing o Releases rehearsed in testing environments before deployed to Production = repeatability, repeatability and a strong team process for changes
  • 17. Focus on the pipeline Think of the Toyota production systemโ€ฆ ๏‚ง Start with Lean o Focus on the customer, eliminate waste o Continuously Improve o Empower the team o Optimize the whole o Plan for change o Automate processes o Build quality in
  • 19. SOURCE CONTROL ๏‚ง Greenfields ๏‚ง Existing systems ๏‚ง Test data Four key stages of the deployment pipeline
  • 20. ๏‚ง Automate builds as first step o Incremental o Complete ๏‚ง Build library of manual tests ๏‚ง Automate testsCONTINUOUS INTEGRATION: FUNDAMENTALS Four key stages of the deployment pipeline
  • 21. ๏‚ง Select CI tooling ๏‚ง Team discipline ๏‚ง Customization of build steps ๏‚ง Automate the testingCONTINUOUS INTEGRATION: ADVANCED Four key stages of the deployment pipeline
  • 22. ๏‚ง Testing ๏‚ง Automation ๏‚ง Safety o Backups o Rollback strategyAUTOMATED DEPLOYMENT Four key stages of the deployment pipeline
  • 23. Create development environment for automation Empower Development ๏‚ง Environment should let them work at their speed Take part in Development ๏‚ง Instead of stopping bad deployments, stop bad development Automate your build process ๏‚ง Supply clean production data or supply good sample data Get started on writing tests ๏‚ง Build your library
  • 24. Different types of testing for different stages of the pipeline: Development Integration Testing QA Pre-Production/ Staging Production Automate testing Unit tests Integration tests Automated tests Deployment validation Behaviour validation Other validations
  • 25. B C D A Always Be Continuously Delivering Deliver
  • 26. Every delivery is practice
  • 27. Fail faster ๏‚ง But less frequently ๏‚ง Smooth the process
  • 28. Testing, testing, testing ๏‚ง Select the right tests for each stage ๏‚ง Review and act on the results
  • 30. DBAs must work with Devsโ€ฆ Yes, you must protect the data for the business, but that must be tempered with helping deliver functionality. Changes to philosophy
  • 31. Devs must work with DBAsโ€ฆ Yes, you may know more about business needs, so educate rather than isolate. Changes to philosophy
  • 32. Project Management must think of operations as part of developmentโ€ฆ Yes: ๏‚ง Deployment is part of development ๏‚ง Release 1.1 and on are part of development o And planning for 1.1 is not premature optimization ๏‚ง Data retention is part of development Changes to philosophy
  • 34. Changes to workplace for continuous database delivery ๏‚ง Empower developers to do more ๏‚ง Bring DBAs into development teams ๏‚ง Management must buy-in ๏‚ง Management must get out of the way
  • 35. How are other companies getting started?
  • 36. Case Study: Boxon ๏‚ง Global packaging and labelling company ๏‚ง Based in Sweden; sub-division in China ๏‚ง Three business areas: profitable packing solutions; intelligent marking; customized big-bags solutions for bulk handling ๏‚ง One developer responsible for ASP.NET application with SQL Server backend, enabling customers to control consistent printing of labels wherever the print shop is located in the world
  • 37. Boxon โ€“ Initial Process ๏‚ง Deploying to production was scaryโ€ฆ ๏‚ง Database changes not version- controlled ๏‚ง 2-hour window - at night - to complete deployments to production โ€“ difficult to find quiet period with a global customer base PAIN POINTS
  • 38. Boxon โ€“ Improved Process ๏‚ง Deployments are less scary nowโ€ฆ ๏‚ง Tickets are logged and prioritized in Unfuddle (unfuddle.com) ๏‚ง Ticket numbers are logged in SVN and TeamCity to track items ๏‚ง Now use SQL Source Control and Subversion to version DB changes o Source of authority on database build ๏‚ง TeamCity (CI build server) is triggered on check-in of changes o Fast response โ€“ changes checked in frequently ๏‚ง Notification if build fails ๏‚ง Build packaged into a Nuget file for deployment BUILDING A PIPELINE
  • 39. Case Study: Move with Us ๏‚ง Risk management solution and sales and marketing channel provider for residential property businesses in the UK ๏‚ง Located near Cambridge, UK ๏‚ง Customers put a heavy load on databases, so updates need to be efficient
  • 40. Move with Us โ€“ Initial Process ๏‚ง Database code often not checked in to VCS due to risk of conflicts โ€“ changes were communicated by email instead ๏‚ง Hot fixes sometimes done directly on integration server ๏‚ง 1 day needed to release updates โ€“ a lot of work in building and testing ๏‚ง Problems with merging code led to a lot of firefighting PAIN POINTS
  • 41. Move with Us โ€“ Improved Process ๏‚ง Each developer has a local copy of database ๏‚ง SQL Source Control and Subversion used to check in database changes to version control ๏‚ง TeamCity (CI build server) automatically compiles changes on check-in ๏‚ง Successful builds packaged into a Nuget file automatically o Fast getting here โ€“ multiple database changes checked in per day ๏‚ง Nuget package deployed to Test on demand ๏‚ง If problems detected, return to Dev to fix BUILDING A PIPELINE
  • 42. Case Study: Practice Fusion ๏‚ง Web-based electronic health record (EHR) company ๏‚ง Founded in 2005 ๏‚ง Based in San Francisco ๏‚ง Hosts over 50 million patient records ๏‚ง Used in all 50 states and by 150k+ physicians ๏‚ง 3 DBA engineers; 1 data architect; 10+ developers
  • 43. Practice Fusion โ€“ Initial Process ๏‚ง Hand-crafted SQL scripts - inconsistent ๏‚ง Database changes not always version controlled ๏‚ง Changes released by opening dozens of files in SSMS ๏‚ง Long-winded team comms if further changes needed ๏‚ง Smoke-testing deployments showed some objects had been deployed straight to Prod and werenโ€™t in deployment script PAIN POINTS
  • 44. Practice Fusion โ€“ Improved Process ๏‚ง SQL Source Control and Subversion to version DB changes o Source of authority on database build ๏‚ง Jenkins (CI build server) is triggered on check-in of changes o More time to develop; less time managing scripts ๏‚ง Build failed by Jenkins if problems detected o Fewer issues deploying to production ๏‚ง Jenkins, SQL Compare and SQL Data Compare used to deploy changes to environments ๏‚ง Custom scripts for replication BUILDING A PIPELINE
  • 45. Summary ๏‚ง Eliminate or mitigate friction o Slow is smooth, smooth is fast ๏‚ง Adopt lean methodologies and focus ๏‚ง Four key stages o Source control o Build automation o Continuous Integration o Continous Deployment ๏‚ง A-B-C-D ๏‚ง Change your philosophy ๏‚ง Change your workplace
  • 46. Goals ๏‚ง Understand the technology and process requirements to work towards automation step- by-step in your release pipeline. ๏‚ง Learn about the organizational changes necessary to support process modifications. ๏‚ง Appreciate why these changes are necessary in support of modern development and deployment methodologies.
  • 47. Documentation and resources ๏‚ง Continuous Delivery by Jez Humble and David Farley (Addison Wesley) ๏‚ง The Phoenix Project: A Novel About IT, DevOps, and Helping Your Business Win by Gene Kim, Kevin Behr and George Spafford (IT Revolution Press) ๏‚ง The Goal: A Process of Ongoing Improvement by Eliyahu M. Goldratt and Jeff Cox (Gower Publishing Ltd.) ๏‚ง Agile Organization by the agile admin (theagileadmin.com) Further resources: ๏‚ง Database Delivery Learning program: www.red-gate.com/delivery o Patterns and practices on Simple-Talk o Tutorials in Red Gate training academy ๏‚ง www.youtube.com/user/RedGateVideos - for recorded seminars
  • 48. Image sources Author Source Information Chiltepinster Wikimedia Commons Mocking Bird Argument.jpg โ€“ Wikimedia Commons. This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license. Source on Wikimedia Commons: โ€œOwn workโ€ Tableatny Wikimedia Commons Athlete at Starting block.jpg โ€“ Wikimedia Commons. This file is licensed under the Creative Commons Attribution 2.0 Generic license. Source on Wikimedia Commons: โ€œBXP135671โ€ n.raveender Wikimedia Commons Stop No Entry.jpg โ€“ Wikimedia Commons. This file is in the public domain. Source on Wikimedia Commons: โ€œOwn work.โ€ Original uploader was Liface at en.wikipedia Wikimedia Commons Cross Country US.jpg โ€“ Wikimedia Commons. This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license. Source on Wikimedia Commons: โ€œTransferred from en.wikipedia; transfer was stated to be made by User:TFCforever.โ€ Notes on license: Liface at the English language Wikipedia, the copyright holder of this work, hereby publishes it under the following license:GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. Subject to disclaimers. Horia Varlan Flickr Graduated cylinders and beaker filled with chemical compounds โ€“ Flickr. This file is licensed under the Creative Commons Attribution 2.0 Generic license. Henry Mรผhlpfordt Flickr CERN Atlas Control Room 2010-07-01 โ€“ Flickr. This file is licensed under the Creative Commons Attribution-ShareAlike 2.0 Generic license. Department for Business, Innovation and Skills Flickr Toyotaโ€™s new Auris โ€“ Flickr. This file is licensed under the Creative Commons Attribution-NoDerivs 2.0 Generic license. Qrodo Photos Flickr Sport Action โ€“ Fencing โ€“ Flickr. This file is licensed under the Creative Commons Attribution 2.0 Generic license. William Warby Flickr Gears โ€“ Flickr. This file is licensed under the Creative Commons Attribution 2.0 Generic license.