Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Database Lifecycle Management: Getting it Right

Database Lifecycle Management: Getting it Right

CodeMash 2016 (Sandusky, OH)

3a53a5136f530c121a196914aecf3936?s=128

Tugberk Ugurlu

January 08, 2016
Tweet

Transcript

  1. Database Lifecycle Management: Getting it Right Tugberk Ugurlu Redgate Software

    @tourismgeek http://tugberkugurlu.com #codemash
  2. @tourismgeek tugberkugurlu.com github.com/tugberkugurlu stackoverflow.com/users/463785/tugberk

  3. @redgate @RedGateCareers red-gate.com/careers

  4. Agenda • Explaining The Problem • The Stages to DLM

    with a Real World Demos • Resources • Questions along the way #codemash
  5. Expectations #codemash

  6. 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
  7. 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
  8. 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
  9. Problem (Typical) v1.1.0 Production QA Dev1 v1.2.0 TEST TEST TEST

    #codemash
  10. Stages to This Hard Problem • S1: Manual: Manual management

    of all database changes • S2: Source Control • S3: Continuous integration • S4: Release Management #codemash
  11. Source Control • Root solution • Provides Single Source of

    Truth • All the advantages of Source Control System • Reverting Changes • Review • Etc. #codemash
  12. DEMO SQL Source Control and Git #codemash

  13. Continuous Integration • Ensuring the Schema Health • Testing #codemash

  14. DEMO TeamCity and SQL CI #codemash

  15. Release Management #codemash • All about Automating Database Releases •

    Providing Review Process • Insight on the Changes • Warnings • Script • Being on the safe side
  16. DEMO Octopus Deploy and SQL Release #codemash

  17. Monitoring #codemash • Two Sides • Performance • State, History

    • Keeping track of what happened • Knowing what the current state • Catching the out of process changes
  18. DEMO DLM Dashboard #codemash

  19. 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
  20. 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