Avoiding the Pitfalls of Database Change Automation Cindy Bean Sr. Software Consultant DBmaestro SQLSaturday #514 – Houston, May 14, 2016.

Slides:



Advertisements
Similar presentations
Development Life Cycle using Visual Studio Team Edition for DB Professionals Richard Fennell Engineering Director SQLBits II Birmingham 1 st March 2008.
Advertisements

ICIS-NPDES Plugin Design Preview Webinar ICIS-NPDES Full Batch OpenNode2 Plugin Project Presented by Bill Rensmith Windsor Solutions, Inc. 3/15/2012.
HP Quality Center Overview.
MIS 2000 Class 20 System Development Process Updated 2014.
Copyright  2002, Medical Present Value, Inc. All rights reserved. Copyright © 2010 Texas Education Agency. All rights reserved. TEA confidential and proprietary.
Software Delivery. Software Delivery Management  Managing Requirements and Changes  Managing Resources  Managing Configuration  Managing Defects 
Validata Release Coordinator Accelerated application delivery through automated end-to-end release management.
Roadmap to Continuous Integration Testing and Benefits Gowri Selka, Walgreens Natalie Koltun, Walgreens May 20th, 2014 ©2013 Walgreen Co. All rights reserved.
HIGH PERFORMANCE CONTINUOUS DELIVERY VERSIONING AND RELEASE MANAGEMENT ALIGNED.
Chapter 15 Design, Coding, and Testing. Copyright © 2005 Pearson Addison-Wesley. All rights reserved Design Document The next step in the Software.
Computers: Tools for an Information Age
Applied Software Project Management Andrew Stellman & Jennifer Greene Applied Software Project Management Applied Software.
#sqlsatPordenone #sqlsat367 February 28, 2015 Testing your databases Alessandro
Microsoft Visual Source Safe 6.01 Microsoft Visual Source Safe (MVSS) Presented By: Rachel Espinoza.
Development and Production Environment Setup with Kentico CMS Karol Jarkovsky Consultant Kentico Software
 What is Software Testing  Terminologies used in Software testing  Types of Testing  What is Manual Testing  Types of Manual Testing  Process that.
Agile Testing with Testing Anywhere The road to automation need not be long.
Continuous Integration for Databases Learn how to automate your build and test Steve Jones Red Gate Software Part II of the Continuous Delivery for Databases.
Michael Solomon Tugboat Software Managing the Software Development Process.
The Integration Story: Rational Quality Manager / Team Foundation Server / Quality Center Introductions This presentation will provide an introduction.
CONTINUOUS INTEGRATION, DELIVERY & DEPLOYMENT ONE CLICK DELIVERY.
Craig Berntson Chief Software Gardener Mojo Software Worx Branches and Merges are Bears, Oh My!
Database Design for DNN Developers Sebastian Leupold.
@benday #vslive Automated Build, Test & Deploy with TFS, ASP.NET, and SQL Server Benjamin
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 4 1 Chapter 4: Basics of Preventive Maintenance and Troubleshooting IT.
& Dev Ops. Sherwin-Williams & DevOps Introduction to Sherwin-Williams.
MERCURY BUSINESS PROCESS TESTING. AGENDA  Objective  What is Business Process Testing  Business Components  Defining Requirements  Creation of Business.
Computer Science and Engineering The Ohio State University  Widely used, especially in the opensource community, to track all changes to a project and.
Partners’ Webinar 01/31/2013 Karol Jarkovsky Solution Architect Upgrading Kentico.
Overview of the Automated Build & Deployment Process Johnita Beasley Tuesday, April 29, 2008.
Anubha Gupta | Software Engineer Visual Studio Online Microsoft Corp. Visual Studio Enterprise Leveraging modern tools to streamline Build and Release.
LOGO Introduction to DevOps 中科大移动云计算系统实验室 孟宁. LOGO Page  2 Agenda Introduce DevOps DevOp Patterns How to Start Adopting DevOps.
Optimal Pipeline Using Perforce, Jenkins & Puppet Nitin Pathak Works on
Adxstudio Portals Training
Real World SQL Server Data Tools Benjamin
Microsoft Corporation. Announcement Visual Studio® Team System 2008 Enables you to Build Quality Code Be More Productive Collaborate at the Next Level.
A way to develop software that emphasizes communication, collaboration, and integration between development and IT operations teams.
TEAM FOUNDATION VERSION CONTROL AN OVERVIEW AND WALKTHROUGH By: Michael Mallar.
Continuous Integration for Databases Steve Jones SQLServerCentral Red Gate Software.
The Next Level Of Agile: DevOps and CD אוקטובר 2015.
6/13/2015 Visit the Sponsor tables to enter their end of day raffles. Turn in your completed Event Evaluation form at the end of the day in the Registration.
Scripting Just Enough SSIS to be Dangerous. 6/13/2015 Visit the Sponsor tables to enter their end of day raffles. Turn in your completed Event Evaluation.
Release Management for Visual Studio 2013 Ana Roje Ivančić Ognjen Bajić Ekobit.
1 Punishment Through Continuous Delivery If it hurts, do it more often…
Developing SQL/Server database in Visual Studio Introducing SQL /Server Data Tools Peter Lu.Net Practices Director Principle Architect Nexient March 19.
Benjamin Day Get Good at DevOps: Feature Flag Deployments with ASP.NET, WebAPI, & JavaScript.
Rome 31 January -1 February Team Development in CRM Shan McArthur CEO / CTO Adxstudio, CRM MVP.
Building Your ETL Framework with Biml Meagan Longoria March 19, 2016.
Test Automation Considerations with Regulatory Practices
Bringing DevOps to the Database
Bringing DevOps to the Database
Continuous Delivery- Complete Guide
Version Control with Subversion
Continuous Integration and Continuous Delivery ( Dev-Ops ) - Fortunesoft
Bringing DevOps to the Database
Get Good at DevOps: Feature Flag Deployments with ASP
Design and Programming
YeahMobi CD Practice based on Container -- openstack meetup
Developing Maximum Value
Automated Testing and Integration with CI Tool
Introduction to DevOps
Bringing DevOps to the Database
Delivering Business Value Faster
Baisc Of Software Testing
JOINED AT THE HIP: DEVSECOPS AND CLOUD-BASED ASSETS
Presented by : Chirag Dani & Dhaval Shah
Delivering Business Value Faster
HCL’s Viewpoint – DevOps on MS Cloud
Keeping your SQL Code safe
Samir Behara, Senior Developer, EBSCO
Presentation transcript:

Avoiding the Pitfalls of Database Change Automation Cindy Bean Sr. Software Consultant DBmaestro SQLSaturday #514 – Houston, May 14, 2016

Agenda  Why Automate?  Database Automation Options  Scripts  Compare and Sync Tools  Database Enforced Source Control  Q&A

Why Automate?  Agile World…  Doing better with less  Reacting quickly to market needs  Getting ahead of competition  Just can’t wait 6 months for that next release…  Agile Development  Process Automation  Continuous Delivery

Dealing with Risk  Smaller, more focused changes are easier to manage (Agile…)  Automation of repeating tasks lowers risk of (human) error  Development and Operations should work in synergy (DevOps)

Automation is the Name of the Game… Continuous Integration Continuous Delivery Continuous Deployment  DevOps (a clipped compound of "development" and "operations") is a culture, movement or practice that emphasizes the collaboration and communication of both software developers and other information-technology (IT) professionals while automating the process of software delivery and infrastructure changes.

What is Continuous Integration?  Principles and practices of software development  Focus on streamlining development  Developers integrate code into shared repository  Each check-in is verified  Automated builds  Automated tests  Easier & quicker to prevent and find problems, less back tracks => short integrations

And Continuous Delivery?  Next step after continuous integration  Becoming lean, and even more Agile  Make sure each change is releasable  Develop-> build-> test-> move to staging-> acceptance test  Build a process to release with a push of a button  Deploy to production-> test production  Actual deployment to production is manually actuated => Ensure risk mitigation and high efficiency

Why Continuous Delivery?  Rapid changes  Reacting quickly to market needs  Getting ahead of competition  Fewer changes backed out  Better collaboration  Fewer defects  Ultimately better service  Happy customers  Profitability

Continuous Delivery Focus points  Team and process  Version everything  Automate your tests  Fix it, properly (no out of process changes!)  Automate your deployments  Create the deployment pipeline

Database is a Key Component  Database holds your essential information  Changes can impact the entire system  Need to be synchronized with other changes  Often overlooked

Reaching Inside the Database  There is more to a database than SQL scripts  Schema structure  Code  Content and meta-content  Internal dependencies  …  Ensure that changes are not made without authorization  Ensure no out-of-process changes

Real Database Issues

DevOps for Microsoft SQL Server  Goals for Continuous Delivery  Database change process  Version control  No “Out of Process” changes  Automate your deployments

Database Automation Options  Scripts  Changelog Activities Tracking  Compare and Sync Tools  Database Enforced Source Control

SCRIPTS

Scripts  Requires organization  One script per object or script per change  Where to store, filesystem or version control  How to name files  Scripts are not connected to actual database objects  No red-flags if the script cannot execute properly until it’s run  No auditing of the database changes

Two Isolated Processes

Scripts Pit Falls

Scripts & Version Control  Challenges…  Code-overrides  Working on the wrong revisions  Scripts not always checked-in to the version control solution  Out of process updates go unnoticed  Hard to locate outdated update scripts  Order of script execution (data dependencies)

Scripts are Static…  Scripts, unless super sophisticated:  Unaware of changes made in the target environment  Time passed from their creation until their execution  Potential to override production hot-fixes & work done by parallel teams  Content changes are very hard to manage  Metadata & lookup content does not fit practically into the version control  In most cases they are simply not managed

X Scripts… Build Once Deploy Many IntQAStageProd Database Deploy Script Environment Re-Base (due to defects) Dev Model Out of Process Change X X X X X ? X

Changelog Activities Tracking  Process similar to scripts (ex. Liquibase)  Create a changelog file in XML  Add a changeset (unique ID and author)

Changelog Activities Tracking  Process similar to scripts (continued)  Run the changeset  Check your database  Two other tables are created  databasechangelog  databasechangeloglock

Changelog Activities Tracking  Benefits  Easy if you know XML  Supports many database types  Challenges  Organize changelog files  Master changelog to order releases  More files to manage  Recommended to keep stored procedures separate  Recommended to avoid multiple changes per changeset

COMPARE AND SYNC TOOLS

Compare & Sync tools  Compares the differences between databases and generates script to implement  Challenges…  Out of process changes  Parallel development  Conflicts

Compare & Sync tools Safe to automate? Sure…

Deployment Automation  An index exists in Target (Production) but not in source (QA)  What should we do? Drop the index or not?

Compare & Sync tools Safe to automate? No. Requires manual inspection…

Safe? Simple, right? NO! we are going to BREAK production without even knowing…

How Can It Break Production???  A compare & sync tool:  Is unaware of any changes that occurred before the time it ran  Has no knowledge of changes that took place at the target environment  Does not leverage version control for more information  Unable to deal with conflicts & merges between different teams

How Can It Break Production???  A compare & sync tool:  … Requires manual inspection  Requires detailed knowledge regarding each change as part of the process So… no automation… as automating problems into production is a major risk!!!

DATABASE ENFORCED SOURCE CONTROL

Manage DB Code Like Application Code? Build Server Impact Analysis Generate Delta Script Merge Conflicts UAT Servers Execute SQL Scripts Run Auto Tests Prod Servers Execute SQL Scripts Binaries – Source Control Repository Database Source Control Repository Test Servers Execute SQL Scripts Run Auto Tests In Case of Defects: Return to Dev or Fix Locally and Handle Conflicts Development Databases Enforced Source Control Check-In Database Changes Database Deployment Safety Net

Database Enforced Source Control  Integrated Version Control process  Leverage proven version control best practices  Force check in & out for database changes  Labels  etc..  No code-overrides  Always working with the correct revision  All changes are documented

Database Enforced Source Control  Integrated Version Control process  Always know who did what, when, why and from where  No out-of-process changes  Supporting structure and code  No time spent on manual coding of the change scripts

Version Control – 1 Enforced Process Database IDE

Source vs. Target Action =No Action ≠ ? Source vs. Baseline Target vs. Baseline Action ==No Action ≠=Deploy Changes =≠Protect Target ≠≠Merge Changes You do not have all of the information Including the Baseline in the impact analysis identifies conflicts to prevent code overrides Simple Compare & Sync Baseline aware Analysis Deployment Automation - Safety Net

Protecting Target Environment DevelopmentBaseline Previous Label / Production Golden Copy Production No index in baseline => we should protect the NEW index on production!!! (Protect Target)

Protecting Target Environment BUT… If we had the index in the baseline => we should take it down from production… (Deploy Change) DevelopmentBaseline Previous Label / Production Golden Copy Production

Deployment Automation And Merge???

Impact Analysis

Safety Net For Deployment Automation  Database Safe Automation:  Leverages version control  Can be run as a batch process  Integrates to ALM (labels, Continuous Integration & Delivery)  Deals with conflicts & merges to match code agility Can raise red flags to stop the line… if requires human intervention

Comparison Chart

Visit the Sponsor tables to enter their end of day raffles. Turn in your completed Event Evaluation form at the end of the day in the Registration area to be entered in additional drawings. Want more free training? Check out the Houston Area SQL Server User Group which meets on the 2 nd Tuesday of each month. Details at Thank You Sponsors!

Deployment Automation Q & A

47 Thanks… Cindy Bean