SlideShare a Scribd company logo
@_AlexYates_
#ManSSUG
Getting CI right for SQL Server
Alex Yates
@_AlexYates_
#ManSSUG
DLM Consultant
workingwithdevs.com
alex.yates@dlmconsultants.com
AlexYates
@_AlexYates_
@_AlexYates_
#ManSSUG
@_AlexYates_ | #ManSSUG
@_AlexYates_
#ManSSUG
Farm Credit Services of America (FCSA)
• 100 person IT team, 14 sub-teams
• Database version control inconsistent
• Deployment process manual
• Delivery was slow and unreliable
@_AlexYates_
#ManSSUG
What is CI?
@_AlexYates_
#ManSSUG
What is CI?
Continuous Integration (CI) is a development practice that
requires developers to integrate code into a shared repository
several times a day.
Each check-in is then verified by an automated build, allowing
teams to detect problems early.
www.thoughtworks.com/continuous-integration
@_AlexYates_
#ManSSUG
http://www.jamesshore.com/Blog/Continuous-Integration-on-a-Dollar-a-Day.html
@_AlexYates_
#ManSSUG
Farm Credit Services of America (FCSA)
• Growing test suite
• Delivery faster and more reliable
• Standardised source control process
• Automated builds/deploys from source control
@_AlexYates_
#ManSSUG
The deployment pipeline
@_AlexYates_
#ManSSUG
Databases are hard
• Schema changes vs existing data
• Reference data vs production data
• Teamwork and testing
• Database drift (change outside
process, e.g. production hot-fixes)
@_AlexYates_
#ManSSUG
The deployment pipeline
@_AlexYates_
#ManSSUG
Agenda
Version control
Model vs migrations
Automated builds
Unit testing
Drift
General advice
@_AlexYates_
#ManSSUG
Agenda
Version control
Model vs migrations
Automated builds
Unit testing
Drift
General advice
@_AlexYates_
#ManSSUG
Version Control
@_AlexYates_
#ManSSUG
Version control - LMGTFY
@_AlexYates_
#ManSSUG
Agenda
Version control
Model vs migrations
Automated builds
Unit testing
Drift
General advice
@_AlexYates_
#ManSSUG
Agenda
Version control
Model vs migrations
Automated builds
Unit testing
Drift
General advice
@_AlexYates_
#ManSSUG
There’s
more than
one way to
skin a cat
@_AlexYates_
#ManSSUG
There’s
more than
one way to
skin
automate
a cat
@_AlexYates_
#ManSSUG
V1 V2
@_AlexYates_
#ManSSUG
V1 V2
Migrations-based solutions
@_AlexYates_
#ManSSUG
V1 V2
State-based solutions
@_AlexYates_
#ManSSUG
@_AlexYates_
#ManSSUG
“There's nothing more
reliable than keeping
track of exactly the
scripts you intend to run,
and running them, without
trying to compare state
and guess.”
@_AlexYates_
#ManSSUG
“There's nothing more
reliable than keeping
track of exactly the
scripts you intend to run,
and running them, without
trying to compare state
and guess.”
Paul Stovell,
built Octopus Deploy
http://docs.octopusdeploy.com/display/OD/SQL+Server+databases
@_AlexYates_
#ManSSUG
“As soon as you have
multiple changes on a
single aspect of an object,
ordering and the ability to
detect which change
needs to be made gets
very complicated.”
@_AlexYates_
#ManSSUG
“As soon as you have
multiple changes on a
single aspect of an object,
ordering and the ability to
detect which change
needs to be made gets
very complicated.”
Gert Drapers,
built DataDude
https://blogs.msdn.microsoft.com/gertd/2009/06/05/declarative-database-development/
@_AlexYates_
#ManSSUG
Migrations vs state
http://workingwithdevs.com/delivering-databases-migrations-vs-state/
@_AlexYates_
#ManSSUG
Migrations vs state
http://workingwithdevs.com/delivering-databases-migrations-vs-state/
@_AlexYates_
#ManSSUG
Migrations vs state
http://workingwithdevs.com/delivering-databases-migrations-vs-state/
@_AlexYates_
#ManSSUG
Migrations vs state
http://workingwithdevs.com/delivering-databases-migrations-vs-state/
@_AlexYates_
#ManSSUG
Migrations vs state
http://workingwithdevs.com/delivering-databases-migrations-vs-state/
@_AlexYates_
#ManSSUG
Migrations vs state
http://workingwithdevs.com/delivering-databases-migrations-vs-state/
@_AlexYates_
#ManSSUG
Migrations vs state
http://workingwithdevs.com/delivering-databases-migrations-vs-state/
@_AlexYates_
#ManSSUG
State
 Easier (less control)
 Better for sprocs/functions
 Better for large/distributed
teams
 Better for frequent changes
 Better for dependency
nightmares
 Drift: rolled back
 Better for development
Migrations
 More control (harder/needs
discipline)
 Better for data migrations
 Better for small teams
 Better for infrequent
changes
 Better for simple data stores
 Drift: ignored
 Better for automation
VS
@_AlexYates_
#ManSSUG
DLMConsultants.com/model-vs-mig
@_AlexYates_
#ManSSUG
Demo
@_AlexYates_
#ManSSUG
Agenda
Version control
Model vs migrations
Automated builds
Unit testing
Drift
General advice
@_AlexYates_
#ManSSUG
Agenda
Version control
Model vs migrations
Automated builds
Unit testing
Drift
General advice
@_AlexYates_
#ManSSUG
Continuous Integration
@_AlexYates_
#ManSSUG
Build servers
@_AlexYates_
#ManSSUG
VCS Build Test Sync
Upgrade scriptDatabase
package
Test
results
The automated build process
@_AlexYates_
#ManSSUG
Builds/Tests
are run on
CI agents
Builds/Tests are
managed on
CI server
CI
server
How do build servers work?
@_AlexYates_
#ManSSUG
Demo
@_AlexYates_
#ManSSUG
Agenda
Version control
Model vs migrations
Automated builds
Unit testing
Drift
General advice
@_AlexYates_
#ManSSUG
Agenda
Version control
Model vs migrations
Automated builds
Unit testing
Drift
General advice
@_AlexYates_
#ManSSUG
Unit testing
@_AlexYates_
#ManSSUG
Unit testing
www.tsqlt.org
@_AlexYates_
#ManSSUG
Unit testing
www.tsqlt.org
@_AlexYates_
#ManSSUG
Unit testing
www.tsqlt.org
@_AlexYates_
#ManSSUG
www.tsqlt.org
Unit testing
@_AlexYates_
#ManSSUG
Unit testing
@_AlexYates_
#ManSSUG
Unit testing
@_AlexYates_
#ManSSUG
http://workingwithdevs.com/three-odd-attitudes-towards-database-unit-testing-that-make-me-angry/
@_AlexYates_
#ManSSUG
Demo
@_AlexYates_
#ManSSUG
Agenda
Version control
Model vs migrations
Automated builds
Unit testing
Drift
General advice
@_AlexYates_
#ManSSUG
Agenda
Version control
Model vs migrations
Automated builds
Unit testing
Drift
General advice
@_AlexYates_
#ManSSUG
Drift
@_AlexYates_
#ManSSUG
@_AlexYates_
#ManSSUG
“When making changes
directly on production, you are
making a decision that the
delay due to poor cycle time is
more expensive than the risk of
making a mistake.”
@_AlexYates_
#ManSSUG
“When making changes
directly on production, you are
making a decision that the
delay due to poor cycle time is
more expensive than the risk of
making a mistake.”
AlexYates,
built this slide
@_AlexYates_
#ManSSUG
The bad stuff:
• Accidental roll-backs
(state)
• Failed deployments
(migrations)
• Environment inconsistency
(migrations)
@_AlexYates_
#ManSSUG
Drift
Strategies to help
 Improve cycle time
 Strict security policies
 Monitor drift (play with DDL
triggers)
 Redgate DLM Dashboard (free)
https://www.simple-talk.com/sql/database-administration/database-deployment-the-bits-database-version-drift/
@_AlexYates_
#ManSSUG
Drift
Strategies to help
 Improve cycle time
 Strict security policies
 Monitor drift (play with DDL
triggers)
 Redgate DLM Dashboard (free)
http://www.red-gate.com/products/dlm/dlm-dashboard/
@_AlexYates_
#ManSSUG
Demo
@_AlexYates_
#ManSSUG
Agenda
Version control
Model vs migrations
Automated builds
Unit testing
Drift
General advice
@_AlexYates_
#ManSSUG
Agenda
Version control
Model vs migrations
Automated builds
Unit testing
Drift
General advice
@_AlexYates_
#ManSSUG
• Teamwork above tools/process
• Don’t do *all the things* at once - start with VCS and drift
• Don’t forget tests
• Decouple database from other systems
• Learn CI on an easy database/project
• Use the right process/tool for your database and team
• Ask me for help!
General advice
@_AlexYates_
#ManSSUG
Agenda
Version control
Model vs migrations
Automated builds
Unit testing
Drift
General advice
@_AlexYates_
#ManSSUG
• Standardised VCS, CI and RM processes
• FCSA delivering much more efficiently
• FCSA process model for sister organisations
• The team all have excellent CV’s
Farm Credit Services of America (FCSA)
@_AlexYates_
#ManSSUG
• Standardised VCS, CI and RM processes
• FCSA delivering much more efficiently
• FCSA process model for sister organisations
• The team all have excellent CV’s
Farm Credit Services of America (FCSA)
http://www.codeaperture.io/2016/09/13/how-redgate-helped-define-our-process/
Getting CI right for SQL Server
@_AlexYates_
#ManSSUG
Siloed sparrows suck at DLM
@_AlexYates_
#ManSSUG
Heated hippos are closed minded
@_AlexYates_
#ManSSUG
State
 Easier (less control)
 Better for sprocs/functions
 Better for large/distributed
teams
 Better for frequent changes
 Better for dependency
nightmares
 Drift: rolled back
 Better for development
Migrations
 More control (harder/needs
discipline)
 Better for data migrations
 Better for small teams
 Better for infrequent
changes
 Better for simple data stores
 Drift: ignored
 Better for automation
VS
Clever people consider options
@_AlexYates_
#ManSSUG
Use appropriate tools
@_AlexYates_
#ManSSUG
Only hire developers who write tests
@_AlexYates_
#ManSSUG
Hunt his smug face - make pain on it
@_AlexYates_
#ManSSUG
This stuff makes a big difference
http://www.codeaperture.io/2016/09/13/how-redgate-helped-define-our-process/
@_AlexYates_
#ManSSUG
DLMConsultants.com/ci
Getting CI right for SQL Server
@_AlexYates_
#ManSSUG
Questions?
Links: DLMConsultants.com/ci
Contact me: alex.yates@dlmconsultants.com
@_AlexYates_
#ManSSUG
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”
Bit Boy Flickr The elephant in the room – Flickr. This file is licensed under the Creative Commons Attribution 2.0 Generic license.
Nils Rinaldi Flickr Hippo fight 2/3 – Flickr. This file is licensed under the Creative Commons Attribution 2.0 Generic license.
My own collection Taken by/property of Alex Yates Kitten, “There’s more than one way to skin a cat!”
Memegenerator.net Memegenerator.net I don’t always edit database. Content designed to be shared and delivered with credit to memegenerator.net.
Ctrl.Alt.Design ctrla.lt Social Media share icons

More Related Content

PPTX
DevOps 101 for data professionals
PPTX
Database DevOps Anti-patterns
PPTX
Getting CI right for SQL Server
KEY
MonoRails - GoGaRuCo 2012
PDF
Continuously Integrating Distributed Code at Netflix
PDF
DataEngConf SF16 - Data Asserts: Defensive Data Science
PPTX
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
PDF
Shifting is more than shifting left
DevOps 101 for data professionals
Database DevOps Anti-patterns
Getting CI right for SQL Server
MonoRails - GoGaRuCo 2012
Continuously Integrating Distributed Code at Netflix
DataEngConf SF16 - Data Asserts: Defensive Data Science
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
Shifting is more than shifting left

What's hot (20)

PDF
Dockercon USA 2016 - Immutable Awesomeness
PDF
DataEngConf SF16 - Three lessons learned from building a production machine l...
PDF
Demystifying Web Performance
PPTX
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
PDF
What is WAAT?
PPTX
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
PPTX
Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...
PPTX
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
PPTX
(R)evolutionize APM
PPTX
Four Practices to Fix Your Top .NET Performance Problems
PPTX
How to keep you out of the News: Web and End-to-End Performance Tips
PDF
Validations 101
PPTX
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
PPTX
Resiliency through Failure @ OSCON 2013
PPSX
MCE^3 - Konstantin Raev - React Native: Open Source Continuous Build and Deli...
PPTX
MassTLC Cloud Summit Keynote
PPTX
Atlassian User Group NYC April 27 2017 Presentations
PDF
Test Data Preparation: Tips and Tricks
PDF
Making operations visible - devopsdays tokyo 2013
PPTX
Web and App Performance: Top Problems to avoid to keep you out of the News
Dockercon USA 2016 - Immutable Awesomeness
DataEngConf SF16 - Three lessons learned from building a production machine l...
Demystifying Web Performance
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
What is WAAT?
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
(R)evolutionize APM
Four Practices to Fix Your Top .NET Performance Problems
How to keep you out of the News: Web and End-to-End Performance Tips
Validations 101
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
Resiliency through Failure @ OSCON 2013
MCE^3 - Konstantin Raev - React Native: Open Source Continuous Build and Deli...
MassTLC Cloud Summit Keynote
Atlassian User Group NYC April 27 2017 Presentations
Test Data Preparation: Tips and Tricks
Making operations visible - devopsdays tokyo 2013
Web and App Performance: Top Problems to avoid to keep you out of the News
Ad

Similar to Getting CI right for SQL Server (20)

PPTX
Getting Release Management Right for SQL Server
PPTX
DevOps 101 for data professionals
PPTX
DevOpsDays SLC - Getting Along With Your DBOps Team
PPTX
AcceleTest
PPTX
AcceleTest
PPTX
IndyCodeCamp SDS May 16th 2009
PDF
Db change management automation:- Devops and Ansible
PPT
Continues Deployment - Tech Talk week
PPTX
Resilience and Compliance at Speed and Scale
PPTX
Query Wizards - data testing made easy - no programming
PDF
MySQL Backed - Fraud Prevention
PDF
Horses for Courses: Database Roundtable
PDF
Crosswalk
PPTX
Engineering Velocity @indeed eng presented on Sept 24 2014 at Beyond Agile
PPTX
How to Build a Data-Driven Company: From Infrastructure to Insights
PPTX
How to Build a Data-Driven Company: From Infrastructure to Insights
PPTX
Systems manager email list
PPTX
Systems manager email list
PPTX
Systems manager email list
PPTX
Systems manager email list
Getting Release Management Right for SQL Server
DevOps 101 for data professionals
DevOpsDays SLC - Getting Along With Your DBOps Team
AcceleTest
AcceleTest
IndyCodeCamp SDS May 16th 2009
Db change management automation:- Devops and Ansible
Continues Deployment - Tech Talk week
Resilience and Compliance at Speed and Scale
Query Wizards - data testing made easy - no programming
MySQL Backed - Fraud Prevention
Horses for Courses: Database Roundtable
Crosswalk
Engineering Velocity @indeed eng presented on Sept 24 2014 at Beyond Agile
How to Build a Data-Driven Company: From Infrastructure to Insights
How to Build a Data-Driven Company: From Infrastructure to Insights
Systems manager email list
Systems manager email list
Systems manager email list
Systems manager email list
Ad

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
cuic standard and advanced reporting.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Understanding_Digital_Forensics_Presentation.pptx
MIND Revenue Release Quarter 2 2025 Press Release
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
cuic standard and advanced reporting.pdf
Network Security Unit 5.pdf for BCA BBA.
Reach Out and Touch Someone: Haptics and Empathic Computing
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Programs and apps: productivity, graphics, security and other tools
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Review of recent advances in non-invasive hemoglobin estimation
Agricultural_Statistics_at_a_Glance_2022_0.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Electronic commerce courselecture one. Pdf
Chapter 3 Spatial Domain Image Processing.pdf

Getting CI right for SQL Server