SlideShare una empresa de Scribd logo
1 de 50
The elephant in the room…
…continuous delivery for databases
I help people deliver databases…
@_AlexYates_
workingwithdevs.com
uk.linkedin.com/in/alexanderyates
alex.yates@red-gate.com
 Agile
 Scrum
 Lean
 Iterative
 Continuous Delivery
 Monitoring
 Deployment
 Integrity
 Performance
#worksOnMyMachine
Whoa!
Deployment fail!
#worksOnMyMachine
A cursor?!
You just can’t do that!
#worksOnMyMachine
Hey, you just dropped
my hot-fix!
Focus on the pipeline
 Optimize the whole
 Automate processes
 Focus on bottlenecks
Odd languages
 SQL
 Cubes
 X-Query
Data persistence
 Data outlives
applications
 Data can’t be
replaced
DBA paranoia
 Frankly…
1 2 3
Databases == Bottleneck
#devops
Production
DBA
Chief
Architect
.NET Dev
team lead
(Partners
in crime)
SQL Dev
team lead
Reliability
 Safe
deployments
 Fire prevention
over firefighting
Visibility
 Visualise
pipeline
 Better
coordination
DevOps
 DBA + devs
work together
 Automation
 Agility
1 2 3
Goals for project
There’s more than one way to skin a cat!
V1 V2
Migrations based solutions
V1 V2
State based solutions
V1 V2
“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
“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
“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
Demo: the happy path!
SOURCE
CONTROL
CONTINUOUS
INTEGRATION
AUTOMATED
DEPLOYMENT
11
2 Table rename
 Table ‘foo’ is to be renamed ‘bar’
Edit stored procedure
 Myproc to select col2 from table ‘foo’
(currently it selects only col1)
Task
0124_edit_sproc.sql
ALTER PROCEDURE
myproc
AS
BEGIN
SELECT col1, col2
FROM table_foo
END
0124_edit_sproc.sql 0125_table_rename.sql
EXEC sp_rename
'table_foo',
'table_bar‘
ALTER PROCEDURE
myproc
AS
BEGIN
SELECT col1
FROM table_bar
END
ALTER PROCEDURE
myproc
AS
BEGIN
SELECT col1, col2
FROM table_foo
END
0124_edit_sproc.sql 0125_table_rename.sql
EXEC sp_rename
'table_foo',
'table_bar‘
ALTER PROCEDURE
myproc
AS
BEGIN
SELECT col1
FROM table_bar
END
ALTER PROCEDURE
myproc
AS
BEGIN
SELECT col1, col2
FROM table_foo
END
!
Conflicts easily missed
 Changes overwritten
Order matters
 Last script wins
To review changes
 Much reading, but very
important to get code right
The problem with migrations
V123
myproc.sql
CREATE PROCEDURE
myproc
AS
SELECT col1
FROM table_foo
!
V123
myproc.sql
CREATE PROCEDURE
myproc
AS
SELECT col1
FROM table_foo
V124
myproc.sql
CREATE PROCEDURE
myproc
AS
SELECT col1, col2
FROM table_foo
V123
myproc.sql
CREATE PROCEDURE
myproc
AS
SELECT col1
FROM table_foo
V124
myproc.sql
CREATE PROCEDURE
myproc
AS
SELECT col1, col2
FROM table_foo
V125
myproc.sql
CREATE PROCEDURE
myproc
AS
SELECT col1
FROM table_bar
V123
myproc.sql
CREATE PROCEDURE
myproc
AS
SELECT col1
FROM table_foo
V124
myproc.sql
CREATE PROCEDURE
myproc
AS
SELECT col1, col2
FROM table_foo
V125
myproc.sql
CREATE PROCEDURE
myproc
AS
SELECT col1
FROM table_bar
!
REVISION 123 REVISION 124
table_foo.sql
CREATE TABLE table_foo
(col1 NVARCHAR(max), col2
NVARCHAR(max))
myproc.sql
CREATE PROCEDURE myproc
AS
SELECT col1
FROM table_foo
table_bar.sql
CREATE TABLE table_bar
(col1 NVARCHAR(max), col2
NVARCHAR(max))
myproc.sql
CREATE PROCEDURE myproc
AS
SELECT col1, col2
FROM table_bar
Diff script:
DROP TABLE table_foo
CREATE TABLE table_bar
(col1 NVARCHAR(max), col2
NVARCHAR(max))
ALTER PROCEDURE myproc
AS
SELECT col1, col2 FROM table_bar
The problem with state
Diff script
DROP TABLE table_foo
CREATE TABLE table_bar
(col1 NVARCHAR(max), col2
NVARCHAR(max))
ALTER PROCEDURE myproc
AS
SELECT col1, col2 FROM table_bar
!
The problem with state
Script
DROP TABLE table_foo
CREATE TABLE table_bar
(col1 NVARCHAR(max),
col2 NVARCHAR(max))
ALTER PROCEDURE myproc
AS
SELECT col1, col2
FROM table_bar
Need to understand your tool
 It should be obvious to you that
your tool won’t work
What is the Plan B / override?
 Because one day you’ll need it
Test for data loss
 Automatically (naturally)
The problem with state
One more thing…
State
 Easier (less control)
 Better for sprocs/functions
 Better for large/distributed teams
 Better for frequent changes
 Better for dependency nightmares
 Drift: rolled back
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
So what is better?
State (+migrations)
 SSDT pre/post deploy scripts
 Redgate migrations
Migrations (+state)
 ReadyRoll ‘deploy changes’
Best of both worlds?
Reliability
 Safe
deployments
 Fire prevention
over firefighting
1
Goals for project
Reliability
 Safe
deployments
 Fire prevention
over firefighting
Visibility
 Visualise
pipeline
 Better
coordination
1 2
Goals for project
Reliability
 Safe
deployments
 Fire prevention
over firefighting
Visibility
 Visualise
pipeline
 Better
coordination
DevOps
 DBA + devs
work together
 Automation
 Agility
1 2 3
Goals for project
@_AlexYates_
workingwithdevs.com
uk.linkedin.com/in/alexanderyates
alex.yates@red-gate.com
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”
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.
Stephen Wolfe Flickr Violinists – Flickr. This file is licensed under the Creative Commons Attribution 2.0 Generic license.
Akira Hsu Flickr The Micro Four Thirds Logo by Empire Elite Stormtroopers - for the great “Micro Four Thirds Day” – 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 All pictures are either of me,
taken by friends/colleagues, or
taken by me
All pictures on about me slide, including kitten, and team at Farm Credit Services of America (FCSA). FCSA have allowed
me/Redgate to reference the visit in presentations/marketing material etc.
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

Más contenido relacionado

Destacado

asteRISK
asteRISKasteRISK
asteRISKkrnmcg
 
Addressing the Elephant in the Room - Content Strategy
Addressing the Elephant in the Room - Content StrategyAddressing the Elephant in the Room - Content Strategy
Addressing the Elephant in the Room - Content StrategyRay Killebrew
 
The elephant in the room. discussion
The elephant in the room. discussionThe elephant in the room. discussion
The elephant in the room. discussionAndrew Gelston
 
Strategy - The elephant in the room
Strategy - The elephant in the roomStrategy - The elephant in the room
Strategy - The elephant in the roomIIBA UK Chapter
 
Moving the Elephant in the Room: Data Migration at Scale
Moving the Elephant in the Room: Data Migration at ScaleMoving the Elephant in the Room: Data Migration at Scale
Moving the Elephant in the Room: Data Migration at ScaleTyrone Hinderson
 
Elephant in the Room: Social Media ROI - WEB 2.0 NYC
Elephant in the Room: Social Media ROI - WEB 2.0 NYCElephant in the Room: Social Media ROI - WEB 2.0 NYC
Elephant in the Room: Social Media ROI - WEB 2.0 NYCMike Lewis
 
Elephant in the Room: Scaling Storage for the HathiTrust Research Center
Elephant in the Room: Scaling Storage for the HathiTrust Research CenterElephant in the Room: Scaling Storage for the HathiTrust Research Center
Elephant in the Room: Scaling Storage for the HathiTrust Research CenterRobert H. McDonald
 
The elephant in the room mongo db + hadoop
The elephant in the room  mongo db + hadoopThe elephant in the room  mongo db + hadoop
The elephant in the room mongo db + hadoopiammutex
 
Lance Concannon, Sysomos: Simplifiying social - How marketers can manage the ...
Lance Concannon, Sysomos: Simplifiying social - How marketers can manage the ...Lance Concannon, Sysomos: Simplifiying social - How marketers can manage the ...
Lance Concannon, Sysomos: Simplifiying social - How marketers can manage the ...ad:tech London, MMS & iMedia
 
CMS Expo 2011 Keynote - The Elephant in the Room
CMS Expo 2011 Keynote - The Elephant in the RoomCMS Expo 2011 Keynote - The Elephant in the Room
CMS Expo 2011 Keynote - The Elephant in the RoomScott Liewehr
 
RIDE 2011: Student dropout – the elephant in the room of distance education (...
RIDE 2011: Student dropout – the elephant in the room of distance education (...RIDE 2011: Student dropout – the elephant in the room of distance education (...
RIDE 2011: Student dropout – the elephant in the room of distance education (...Centre for Distance Education
 
The Elephant In The Room - Research Report 31 July 2013
The Elephant In The Room - Research Report 31 July 2013The Elephant In The Room - Research Report 31 July 2013
The Elephant In The Room - Research Report 31 July 2013Howard Cooke
 
The elephant in the room
The elephant in the roomThe elephant in the room
The elephant in the roomJohn Gillis
 
Kanban. Dealing with the elephant in the room. One chunk at a time
Kanban. Dealing with the elephant in the room. One chunk at a timeKanban. Dealing with the elephant in the room. One chunk at a time
Kanban. Dealing with the elephant in the room. One chunk at a timejsonnevelt
 

Destacado (18)

asteRISK
asteRISKasteRISK
asteRISK
 
Addressing the Elephant in the Room - Content Strategy
Addressing the Elephant in the Room - Content StrategyAddressing the Elephant in the Room - Content Strategy
Addressing the Elephant in the Room - Content Strategy
 
ELEARNING IN ART AND DESIGN: THE ELEPHANT IN THE ROOM
ELEARNING IN ART AND DESIGN: THE ELEPHANT IN THE ROOMELEARNING IN ART AND DESIGN: THE ELEPHANT IN THE ROOM
ELEARNING IN ART AND DESIGN: THE ELEPHANT IN THE ROOM
 
Elephant in Room Version 2
Elephant in Room Version 2Elephant in Room Version 2
Elephant in Room Version 2
 
The elephant in the room. discussion
The elephant in the room. discussionThe elephant in the room. discussion
The elephant in the room. discussion
 
Strategy - The elephant in the room
Strategy - The elephant in the roomStrategy - The elephant in the room
Strategy - The elephant in the room
 
Moving the Elephant in the Room: Data Migration at Scale
Moving the Elephant in the Room: Data Migration at ScaleMoving the Elephant in the Room: Data Migration at Scale
Moving the Elephant in the Room: Data Migration at Scale
 
The elephant in the room
The elephant in the roomThe elephant in the room
The elephant in the room
 
Elephant in the Room: Social Media ROI - WEB 2.0 NYC
Elephant in the Room: Social Media ROI - WEB 2.0 NYCElephant in the Room: Social Media ROI - WEB 2.0 NYC
Elephant in the Room: Social Media ROI - WEB 2.0 NYC
 
Elephant in the Room: Scaling Storage for the HathiTrust Research Center
Elephant in the Room: Scaling Storage for the HathiTrust Research CenterElephant in the Room: Scaling Storage for the HathiTrust Research Center
Elephant in the Room: Scaling Storage for the HathiTrust Research Center
 
The elephant in the room mongo db + hadoop
The elephant in the room  mongo db + hadoopThe elephant in the room  mongo db + hadoop
The elephant in the room mongo db + hadoop
 
Lance Concannon, Sysomos: Simplifiying social - How marketers can manage the ...
Lance Concannon, Sysomos: Simplifiying social - How marketers can manage the ...Lance Concannon, Sysomos: Simplifiying social - How marketers can manage the ...
Lance Concannon, Sysomos: Simplifiying social - How marketers can manage the ...
 
CMS Expo 2011 Keynote - The Elephant in the Room
CMS Expo 2011 Keynote - The Elephant in the RoomCMS Expo 2011 Keynote - The Elephant in the Room
CMS Expo 2011 Keynote - The Elephant in the Room
 
G!
G!G!
G!
 
RIDE 2011: Student dropout – the elephant in the room of distance education (...
RIDE 2011: Student dropout – the elephant in the room of distance education (...RIDE 2011: Student dropout – the elephant in the room of distance education (...
RIDE 2011: Student dropout – the elephant in the room of distance education (...
 
The Elephant In The Room - Research Report 31 July 2013
The Elephant In The Room - Research Report 31 July 2013The Elephant In The Room - Research Report 31 July 2013
The Elephant In The Room - Research Report 31 July 2013
 
The elephant in the room
The elephant in the roomThe elephant in the room
The elephant in the room
 
Kanban. Dealing with the elephant in the room. One chunk at a time
Kanban. Dealing with the elephant in the room. One chunk at a timeKanban. Dealing with the elephant in the room. One chunk at a time
Kanban. Dealing with the elephant in the room. One chunk at a time
 

Más de Red Gate Software

The future of DevOps: fully left-shifted deployments with version control and...
The future of DevOps: fully left-shifted deployments with version control and...The future of DevOps: fully left-shifted deployments with version control and...
The future of DevOps: fully left-shifted deployments with version control and...Red Gate Software
 
Embracing DevOps through database migrations with Flyway
Embracing DevOps through database migrations with FlywayEmbracing DevOps through database migrations with Flyway
Embracing DevOps through database migrations with FlywayRed Gate Software
 
Database DevOps for Managed Service Providers
Database DevOps for Managed Service ProvidersDatabase DevOps for Managed Service Providers
Database DevOps for Managed Service ProvidersRed Gate Software
 
Mizuho Financial: Launching our Database DevOps journey
Mizuho Financial: Launching our Database DevOps journeyMizuho Financial: Launching our Database DevOps journey
Mizuho Financial: Launching our Database DevOps journeyRed Gate Software
 
7 steps to effective SQL Server monitoring
7 steps to effective SQL Server monitoring7 steps to effective SQL Server monitoring
7 steps to effective SQL Server monitoringRed Gate Software
 
Level up your deployments for SQL Source Control
Level up your deployments for SQL Source Control Level up your deployments for SQL Source Control
Level up your deployments for SQL Source Control Red Gate Software
 
Key findings from the 2020 state of database dev ops report
Key findings from the 2020 state of database dev ops reportKey findings from the 2020 state of database dev ops report
Key findings from the 2020 state of database dev ops reportRed Gate Software
 
Extend DevOps to Your SQL Server Databases
Extend DevOps to Your SQL Server DatabasesExtend DevOps to Your SQL Server Databases
Extend DevOps to Your SQL Server DatabasesRed Gate Software
 
What we learned at PASS Summit in 2019
What we learned at PASS Summit in 2019What we learned at PASS Summit in 2019
What we learned at PASS Summit in 2019Red Gate Software
 
Quality in Software Development: Anglia Ruskin University
Quality in Software Development: Anglia Ruskin UniversityQuality in Software Development: Anglia Ruskin University
Quality in Software Development: Anglia Ruskin UniversityRed Gate Software
 
How SQL Change Automation helps you deliver value faster
How SQL Change Automation helps you deliver value fasterHow SQL Change Automation helps you deliver value faster
How SQL Change Automation helps you deliver value fasterRed Gate Software
 
DevOps essentials from Abel Wang and Steve Jones
DevOps essentials from Abel Wang and Steve JonesDevOps essentials from Abel Wang and Steve Jones
DevOps essentials from Abel Wang and Steve JonesRed Gate Software
 
Successfully migrating existing databases to Azure
Successfully migrating existing databases to AzureSuccessfully migrating existing databases to Azure
Successfully migrating existing databases to AzureRed Gate Software
 
The Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
The Ultimate Guide to Choosing and Implementing the Right Monitoring ToolThe Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
The Ultimate Guide to Choosing and Implementing the Right Monitoring ToolRed Gate Software
 
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...Red Gate Software
 
Using Redgate, AKS and Azure to bring DevOps to your database
Using Redgate, AKS and Azure to bring DevOps to your databaseUsing Redgate, AKS and Azure to bring DevOps to your database
Using Redgate, AKS and Azure to bring DevOps to your databaseRed Gate Software
 
Using Redgate, AKS and Azure to bring DevOps to your Database
Using Redgate, AKS and Azure to bring DevOps to your DatabaseUsing Redgate, AKS and Azure to bring DevOps to your Database
Using Redgate, AKS and Azure to bring DevOps to your DatabaseRed Gate Software
 
How to Pitch a Software Development Initiative and Ignite Culture Change
How to Pitch a Software Development Initiative and Ignite Culture ChangeHow to Pitch a Software Development Initiative and Ignite Culture Change
How to Pitch a Software Development Initiative and Ignite Culture ChangeRed Gate Software
 

Más de Red Gate Software (20)

The future of DevOps: fully left-shifted deployments with version control and...
The future of DevOps: fully left-shifted deployments with version control and...The future of DevOps: fully left-shifted deployments with version control and...
The future of DevOps: fully left-shifted deployments with version control and...
 
Embracing DevOps through database migrations with Flyway
Embracing DevOps through database migrations with FlywayEmbracing DevOps through database migrations with Flyway
Embracing DevOps through database migrations with Flyway
 
Database DevOps for Managed Service Providers
Database DevOps for Managed Service ProvidersDatabase DevOps for Managed Service Providers
Database DevOps for Managed Service Providers
 
Mizuho Financial: Launching our Database DevOps journey
Mizuho Financial: Launching our Database DevOps journeyMizuho Financial: Launching our Database DevOps journey
Mizuho Financial: Launching our Database DevOps journey
 
7 steps to effective SQL Server monitoring
7 steps to effective SQL Server monitoring7 steps to effective SQL Server monitoring
7 steps to effective SQL Server monitoring
 
Level up your deployments for SQL Source Control
Level up your deployments for SQL Source Control Level up your deployments for SQL Source Control
Level up your deployments for SQL Source Control
 
Key findings from the 2020 state of database dev ops report
Key findings from the 2020 state of database dev ops reportKey findings from the 2020 state of database dev ops report
Key findings from the 2020 state of database dev ops report
 
Extend DevOps to Your SQL Server Databases
Extend DevOps to Your SQL Server DatabasesExtend DevOps to Your SQL Server Databases
Extend DevOps to Your SQL Server Databases
 
2019 year in review slides
2019 year in review slides2019 year in review slides
2019 year in review slides
 
What we learned at PASS Summit in 2019
What we learned at PASS Summit in 2019What we learned at PASS Summit in 2019
What we learned at PASS Summit in 2019
 
Quality in Software Development: Anglia Ruskin University
Quality in Software Development: Anglia Ruskin UniversityQuality in Software Development: Anglia Ruskin University
Quality in Software Development: Anglia Ruskin University
 
How SQL Change Automation helps you deliver value faster
How SQL Change Automation helps you deliver value fasterHow SQL Change Automation helps you deliver value faster
How SQL Change Automation helps you deliver value faster
 
DevOps essentials from Abel Wang and Steve Jones
DevOps essentials from Abel Wang and Steve JonesDevOps essentials from Abel Wang and Steve Jones
DevOps essentials from Abel Wang and Steve Jones
 
Successfully migrating existing databases to Azure
Successfully migrating existing databases to AzureSuccessfully migrating existing databases to Azure
Successfully migrating existing databases to Azure
 
The Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
The Ultimate Guide to Choosing and Implementing the Right Monitoring ToolThe Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
The Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
 
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
 
Using Redgate, AKS and Azure to bring DevOps to your database
Using Redgate, AKS and Azure to bring DevOps to your databaseUsing Redgate, AKS and Azure to bring DevOps to your database
Using Redgate, AKS and Azure to bring DevOps to your database
 
Using Redgate, AKS and Azure to bring DevOps to your Database
Using Redgate, AKS and Azure to bring DevOps to your DatabaseUsing Redgate, AKS and Azure to bring DevOps to your Database
Using Redgate, AKS and Azure to bring DevOps to your Database
 
How to Pitch a Software Development Initiative and Ignite Culture Change
How to Pitch a Software Development Initiative and Ignite Culture ChangeHow to Pitch a Software Development Initiative and Ignite Culture Change
How to Pitch a Software Development Initiative and Ignite Culture Change
 
Taming the Wild West
Taming the Wild West Taming the Wild West
Taming the Wild West
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

The elephant in_the_room_continuous_delivery_for_databases

  • 1. The elephant in the room… …continuous delivery for databases
  • 2.
  • 3. I help people deliver databases… @_AlexYates_ workingwithdevs.com uk.linkedin.com/in/alexanderyates alex.yates@red-gate.com
  • 4.  Agile  Scrum  Lean  Iterative  Continuous Delivery
  • 5.  Monitoring  Deployment  Integrity  Performance
  • 6.
  • 9. #worksOnMyMachine Hey, you just dropped my hot-fix!
  • 10. Focus on the pipeline  Optimize the whole  Automate processes  Focus on bottlenecks
  • 11. Odd languages  SQL  Cubes  X-Query Data persistence  Data outlives applications  Data can’t be replaced DBA paranoia  Frankly… 1 2 3 Databases == Bottleneck
  • 13. Reliability  Safe deployments  Fire prevention over firefighting Visibility  Visualise pipeline  Better coordination DevOps  DBA + devs work together  Automation  Agility 1 2 3 Goals for project
  • 14.
  • 15.
  • 16. There’s more than one way to skin a cat!
  • 17. V1 V2
  • 20.
  • 21. “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
  • 22. “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 “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
  • 23. Demo: the happy path! SOURCE CONTROL CONTINUOUS INTEGRATION AUTOMATED DEPLOYMENT
  • 24. 11 2 Table rename  Table ‘foo’ is to be renamed ‘bar’ Edit stored procedure  Myproc to select col2 from table ‘foo’ (currently it selects only col1) Task
  • 25.
  • 27. 0124_edit_sproc.sql 0125_table_rename.sql EXEC sp_rename 'table_foo', 'table_bar‘ ALTER PROCEDURE myproc AS BEGIN SELECT col1 FROM table_bar END ALTER PROCEDURE myproc AS BEGIN SELECT col1, col2 FROM table_foo END
  • 28. 0124_edit_sproc.sql 0125_table_rename.sql EXEC sp_rename 'table_foo', 'table_bar‘ ALTER PROCEDURE myproc AS BEGIN SELECT col1 FROM table_bar END ALTER PROCEDURE myproc AS BEGIN SELECT col1, col2 FROM table_foo END !
  • 29. Conflicts easily missed  Changes overwritten Order matters  Last script wins To review changes  Much reading, but very important to get code right The problem with migrations
  • 31. V123 myproc.sql CREATE PROCEDURE myproc AS SELECT col1 FROM table_foo V124 myproc.sql CREATE PROCEDURE myproc AS SELECT col1, col2 FROM table_foo
  • 32. V123 myproc.sql CREATE PROCEDURE myproc AS SELECT col1 FROM table_foo V124 myproc.sql CREATE PROCEDURE myproc AS SELECT col1, col2 FROM table_foo V125 myproc.sql CREATE PROCEDURE myproc AS SELECT col1 FROM table_bar
  • 33. V123 myproc.sql CREATE PROCEDURE myproc AS SELECT col1 FROM table_foo V124 myproc.sql CREATE PROCEDURE myproc AS SELECT col1, col2 FROM table_foo V125 myproc.sql CREATE PROCEDURE myproc AS SELECT col1 FROM table_bar !
  • 34.
  • 35. REVISION 123 REVISION 124 table_foo.sql CREATE TABLE table_foo (col1 NVARCHAR(max), col2 NVARCHAR(max)) myproc.sql CREATE PROCEDURE myproc AS SELECT col1 FROM table_foo table_bar.sql CREATE TABLE table_bar (col1 NVARCHAR(max), col2 NVARCHAR(max)) myproc.sql CREATE PROCEDURE myproc AS SELECT col1, col2 FROM table_bar
  • 36. Diff script: DROP TABLE table_foo CREATE TABLE table_bar (col1 NVARCHAR(max), col2 NVARCHAR(max)) ALTER PROCEDURE myproc AS SELECT col1, col2 FROM table_bar The problem with state
  • 37. Diff script DROP TABLE table_foo CREATE TABLE table_bar (col1 NVARCHAR(max), col2 NVARCHAR(max)) ALTER PROCEDURE myproc AS SELECT col1, col2 FROM table_bar ! The problem with state
  • 38. Script DROP TABLE table_foo CREATE TABLE table_bar (col1 NVARCHAR(max), col2 NVARCHAR(max)) ALTER PROCEDURE myproc AS SELECT col1, col2 FROM table_bar Need to understand your tool  It should be obvious to you that your tool won’t work What is the Plan B / override?  Because one day you’ll need it Test for data loss  Automatically (naturally) The problem with state
  • 40.
  • 41. State  Easier (less control)  Better for sprocs/functions  Better for large/distributed teams  Better for frequent changes  Better for dependency nightmares  Drift: rolled back 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 So what is better?
  • 42. State (+migrations)  SSDT pre/post deploy scripts  Redgate migrations Migrations (+state)  ReadyRoll ‘deploy changes’ Best of both worlds?
  • 43.
  • 44. Reliability  Safe deployments  Fire prevention over firefighting 1 Goals for project
  • 45.
  • 46. Reliability  Safe deployments  Fire prevention over firefighting Visibility  Visualise pipeline  Better coordination 1 2 Goals for project
  • 47. Reliability  Safe deployments  Fire prevention over firefighting Visibility  Visualise pipeline  Better coordination DevOps  DBA + devs work together  Automation  Agility 1 2 3 Goals for project
  • 48.
  • 50. 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” 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. Stephen Wolfe Flickr Violinists – Flickr. This file is licensed under the Creative Commons Attribution 2.0 Generic license. Akira Hsu Flickr The Micro Four Thirds Logo by Empire Elite Stormtroopers - for the great “Micro Four Thirds Day” – 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 All pictures are either of me, taken by friends/colleagues, or taken by me All pictures on about me slide, including kitten, and team at Farm Credit Services of America (FCSA). FCSA have allowed me/Redgate to reference the visit in presentations/marketing material etc. 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

Notas del editor

  1. You may have seen a similar talk with a similar name at NDC London. I’ve spoken with Enrico and I agree there is an elephant we need to discuss. I’m going to approach the subject in a similar but different way. Show of hands: For your apps, who uses VCS? CI? Who has an automated deployment pipeline? Now groan or cheer – is it a good thing? Keep your hands up if you do the same for the database? NEW SLIDE
  2. In my experience the database holds people back…
  3. My name is Alex etc Now – who has read a book about programming in the last two decades? Did it have these words in it? NEXT SLIDE
  4. Show of hands… Who is a developer? Project manager? Do we have any DBAs? DBAs care about… NEXT SLIDE
  5. DBAs care about this stuff. Two buisness entities with different goals. It causes friction. NEXT SLIDE
  6. Who has separate teams of DBAs and developers?
  7. And things get really stressful when deployments fail.
  8. Sometimes DEV fail
  9. Sometimes OPS fail
  10. Think about it as a continuous pipeline – you are both responsible for different parts You need to work together on hand-offs
  11. An example of everyone working together
  12. Lets take a closer look at that diagram
  13. Let’s make it a little clearer Now there are various ways to solve this problem…
  14. There’s normally more than one way to skin a cat. Database CD is the same.
  15. Fundamentally this is our problem with databases - get from one state to another. With apps you don’t need to worry about the transition, with databases you do. NEXT SLIDE…
  16. This leads some to think about database migrations in terms of the upgrade scripts… Migrations based solutions like Dbup, FlyWay, DbDeploy and ReadyRoll. NEXT SLIDE…
  17. Other people still see the value/need to consider the state. This is important for repeatable testing etc. Migrations become a deployment detail because some would argue that scripting out every minor change is an overhead and opens up possibility of human error. NEXT SLIDE…
  18. People get really passionate about one solution or the other. It’s become a really hot and polarised debate. I’m calling for people on both sides to be more open minded. Who here has seen Seb Rose’s lightning talk about passionate developers? Well worth a watch! NEXT SLIDE… NEXT SLIDE… NEXT SLIDE…
  19. For example, Paul Stovell basically says the migrations approach is reliable and provides the functionality to handle the deployment whatever way works.
  20. Bert Gert Drapers from Microsoft points out that the state based solutions tend to be more practical and easier to implement in practice. Some would say that migrations is the powerful option while state is the easy option.
  21. With migrations you have to maintain many upgrade scripts. Strength: Complete control. Power and responsibility. Weakness: Challenge to manage. Winding path.
  22. With migrations you have to maintain many upgrade scripts. Strength: Complete control. Power and responsibility. Weakness: Challenge to manage. Winding path.
  23. Although we’ve done a rename, it’s evident only by examining the before and after states. The migrations approach show how the change is made, but doesn’t have knowledge about the before and after states.
  24. An example of everyone working together
  25. An example of everyone working together
  26. An example of everyone working together
  27. By adopting a CD process for the DB the DBA is involved earlier. He can review code in source control before it goes anywhere near production. Reviewing deployments becomes less about QA and more about timing deployments appropriately and double checking for any red flags.