Slide 1

Slide 1 text

Database Lifecycle Management: Getting it Right Tugberk Ugurlu Redgate Software @tourismgeek http://tugberkugurlu.com #codemash

Slide 2

Slide 2 text

@tourismgeek tugberkugurlu.com github.com/tugberkugurlu stackoverflow.com/users/463785/tugberk

Slide 3

Slide 3 text

@redgate @RedGateCareers red-gate.com/careers

Slide 4

Slide 4 text

Agenda • Explaining The Problem • The Stages to DLM with a Real World Demos • Resources • Questions along the way #codemash

Slide 5

Slide 5 text

Expectations #codemash

Slide 6

Slide 6 text

Expectations • It’s not about tools. • It’s not only about SQL Server but it’s what I am going to be showing. • Lots of moving parts in action but that’s A-OK. • Something you can apply right away #codemash

Slide 7

Slide 7 text

Why you should care? • There is no such an app w/o data. • Unlocking the Doors For Continuous Delivery • Fast release cycle • Continuous feedback loop • Tools have historically been primitive • Rolling your own solution is great, but it isn't adding value to your business. #codemash

Slide 8

Slide 8 text

Problem (Simplest) dbo.Foo dbo.Bar dbo.FooBar dbo.GetBiggest v1.2.0 Dev1 dbo.Foo dbo.Bar dbo.GetBiggest v1.1.0 Production #codemash

Slide 9

Slide 9 text

Problem (Typical) v1.1.0 Production QA Dev1 v1.2.0 TEST TEST TEST #codemash

Slide 10

Slide 10 text

Stages to This Hard Problem • S1: Manual: Manual management of all database changes • S2: Source Control • S3: Continuous integration • S4: Release Management #codemash

Slide 11

Slide 11 text

Source Control • Root solution • Provides Single Source of Truth • All the advantages of Source Control System • Reverting Changes • Review • Etc. #codemash

Slide 12

Slide 12 text

DEMO SQL Source Control and Git #codemash

Slide 13

Slide 13 text

Continuous Integration • Ensuring the Schema Health • Testing #codemash

Slide 14

Slide 14 text

DEMO TeamCity and SQL CI #codemash

Slide 15

Slide 15 text

Release Management #codemash • All about Automating Database Releases • Providing Review Process • Insight on the Changes • Warnings • Script • Being on the safe side

Slide 16

Slide 16 text

DEMO Octopus Deploy and SQL Release #codemash

Slide 17

Slide 17 text

Monitoring #codemash • Two Sides • Performance • State, History • Keeping track of what happened • Knowing what the current state • Catching the out of process changes

Slide 18

Slide 18 text

DEMO DLM Dashboard #codemash

Slide 19

Slide 19 text

Going Further • Migrations Based Approach • Typical Integration Testing/QA/Staging/Production loop • Zero Downtime Deployments • Deploying to Multiple Database (e.g. Multi-tenant Applications) • Catastrophic Cases (Unhealthy Releases, etc.) #codemash

Slide 20

Slide 20 text

Resources • Demo Source Code: https://github.com/british-proverbs/british-proverbs-sql- source-control • DLM Automation Suite: http://www.red-gate.com/products/dlm/dlm- automation-suite/ • Octopus Deploy: https://octopusdeploy.com/ • ReadyRoll: http://ready-roll.com/ • TeamCity: https://www.jetbrains.com/teamcity/ • DLM Dashboard: http://www.red-gate.com/products/dlm/dlm-dashboard • Continuous Delivery for Databases by Alex Yates: https://vimeo.com/131637362 #codemash