Improving database development. Recommendations for solving development problems using Red Gate tools



Similar documents
WHITEPAPER. Improving database development

Continuous integration for databases using Red Gate tools

Continuous integration for databases using

Continuous integration for databases using Redgate tools

SQL DBA Bundle. Data Sheet. Data Sheet. Introduction. What does it cost. What s included in the SQL DBA Bundle. Feedback for the SQL DBA Bundle

Key Benefits of Microsoft Visual Studio Team System

Visual Studio Team Edition for Database Professionals. Woody Pewitt Developer Evangelist

Nick Ashley TOOLS. The following table lists some additional and possibly more unusual tools used in this paper.

Contents. Introduction... 1

Distributed Software Development with Perforce Perforce Consulting Guide

Server Monitoring: Centralize and Win

Tracking Database Schema Changes. Guidelines on database versioning using Devart tools

CASE STUDY LUMIDATA. SQL Toolbelt. Essential tools for SQL Server. 91% of Fortune 100 companies use Red Gate

WHITEPAPER. Solving database deployments with Database Lifecycle Management

Tech Notes. Corporate Headquarters EMEA Headquarters Asia-Pacific Headquarters 100 California Street, 12th Floor San Francisco, California 94111

Orchestrated. Release Management. Gain insight and control, eliminate ineffective handoffs, and automate application deployments

5 barriers to database source control and how you can get around them

PRESENTS... Reasons to Switch from SourceSafe: How to Make Your Life Easier with SourceAnywhere Standalone

Development Best Practices

WHITEPAPER. Compliance: what it means for databases

Continuous Integration (CI)

The Benefits of a Unified Enterprise Content Management Platform

About database backups

Effective Release Management for HPOM Monitoring

Green Migration from Oracle

Comparison: Perforce and Microsoft Team Foundation Server (TFS)

Invest in your business with Ubuntu Advantage.

Librarian. Integrating Secure Workflow and Revision Control into Your Production Environment WHITE PAPER

Protecting Business Information With A SharePoint Data Governance Model. TITUS White Paper

How To Manage Content Management With A Single System

ATTACHMENT 6 SQL Server 2012 Programming Standards

Overview. Datasheet: Centerprise Connector for Salesforce. Key Features. Overview

Subversion Integration for Visual Studio

Agile Business Suite: a 4GL environment for.net developers DEVELOPMENT, MAINTENANCE AND DEPLOYMENT OF LARGE, COMPLEX BACK-OFFICE APPLICATIONS

Manual Tester s Guide to Automated Testing Contents

Case Study - MetaVis Migrator

Backing Up CNG SAFE Version 6.0

Streamlining Your AP Processes with Electronic Document Management

Print Audit 6 Network Installation Guide

Top Ten Reasons to Transition Your IT Sandbox Environments to the Cloud

RapidStart Implementation

Software Configuration Management Best Practices

Copyrighted , Address :- EH1-Infotech, SCF 69, Top Floor, Phase 3B-2, Sector 60, Mohali (Chandigarh),

Automated Testing Best Practices

In depth study - Dev teams tooling

Using ExtraView to Consolidate Multiple Tracking Systems

DATABASE VIRTUALIZATION AND INSTANT CLONING WHITE PAPER

Best Practices for Migrating from Lotus Notes to Microsoft Exchange and SharePoint

How to Secure Your SharePoint Deployment

Life Cycle Management for Oracle Data Integrator 11 & 12. At lower cost Get a 30% return on investment guaranteed and save 15% on development costs

W H I T E P A P E R S A P E R P L i f e - C y c l e M a n a g e m e n t O v e r c o m i n g t h e D o w n s i d e o f U p g r a d i n g

Application Development With Data Studio

Coverity Services. World-class professional services, technical support and training from the Coverity development testing experts

QlikView 11 Source Control Walkthrough

Microsoft Visual Studio Integration Guide

Universal Controller Solution Brief

Leveraging Rational Team Concert's build capabilities for Continuous Integration

IBM Endpoint Manager Version 9.1. Patch Management for Red Hat Enterprise Linux User's Guide

Microsoft. Course 20463C: Implementing a Data Warehouse with Microsoft SQL Server

We ( have extensive experience in enterprise and system architectures, system engineering, project management, and

How to Prepare for the Upgrade to Microsoft Dynamics CRM 2013 (On-premises)

Improving Cognos Upgrades Methodology to Lower Costs & Improve Upgrade Management

WHITE PAPER Using SAP Solution Manager to Improve IT Staff Efficiency While Reducing IT Costs and Improving Availability

CONTENT STORE SURVIVAL GUIDE

The Top 10 Things DBAs Should Know About Toad for IBM DB2

Professional Services Management for Microsoft Dynamics AX

Using Colligo Contributor to Migrate Lotus Notes Applications to SharePoint

Microsoft Enterprise Project Management 2010 Licensing Guide

Marathon Information Management Program

Global Software Change Management for PVCS Version Manager

White Paper. Securing and Integrating File Transfers Over the Internet

Increasing Business Efficiency and Agility for ATGbased. Systems. the business challenge: upgrading the development pipeline

Implementing Oracle BI Applications during an ERP Upgrade

The Virtualization Practice

What s New Guide: Version 5.6

ELIMINATING COMPLINCE RISKS - DATA MASKING WITH AZURE

Cloud Testing Testing on the Cloud

WHITEPAPER. SBM Path to Production for Enterprises

Continuous Integration

Autodesk Vault 2016 What s new

MySQL Enterprise Edition Most secure, scalable MySQL Database, Online Backup, Development/Monitoring Tools, backed by Oracle Premier Lifetime Support

IBM Software InfoSphere Guardium. Planning a data security and auditing deployment for Hadoop

ROI EVALUATION REPORT REPLIWEB DEPLOYMENT

White Paper. Streamlining Your AP Processes with Electronic Document Management ABSTRACT. Command Your Content

Solving the database deployment problem

Simplifying development through activity-based change management

QlikView 11 Feature Sheet Source Control Integration

Data Warehouse and Business Intelligence Testing: Challenges, Best Practices & the Solution

Nexus Professional Whitepaper. Repository Management: Stages of Adoption

Transcription:

Improving database development Recommendations for solving development problems using Red Gate tools

Introduction At Red Gate, we believe in creating simple, usable tools that address the problems of software developers and technology businesses. In considering the entire database development process we observed a number of costly, time-consuming, and highly obstructive problems that keep developers and businesses from working efficiently. This paper gives an overview of the problems of database development, particularly those of change management and migration. It outlines the typical Develop, Test, Deploy structure of database development, proposes improvements at each stage of the process, and introduces a source control solution that finally places databases on a par with application development. These recommendations are particularly relevant to development teams and businesses seeking to increase development efficiency, for instance to eliminate a backlog of high-priority, mission-critical development work. Crucially for these teams, the paper describes a complete database development package that integrates with existing working practices. The development cycle The standard database development process has three core stages: 1. Develop The development team updates the database. Ideally, changes are source controlled. This enables tracking, and eases continuous integration. However, source control for databases is not yet widely adopted. 2. Test Migration scripts are created to move development changes to realistic testing and staging environments. The QA or Testing team ensure there are no bugs or regressions. 3. Deploy If testing is successful, migration scripts are created to deploy the changes to a staging environment, and then to production servers. These final deployment scripts are typically scrutinized and ultimately run by a DBA. The database development cycle is similar to that for application code, but with some crucial difficulties. For instance, there is often no source control; versioning is cumbersome; dependency chains can be complex and opaque; and the very nature of database "code" makes deployment a significant bottleneck. Each stage in the cycle typically involves substantial manual scripting and a change management overhead. Each stage also has inefficiencies, and can be automated or made simpler, reducing errors and easing coordination. Red Gate Software Ltd 2

This article seeks to address these issues, and offer solutions using the Red Gate SQL development suite. The problem of change management Even in a small project, where a single developer is modifying a simple database, changes can introduce bugs and regressions. The more complex the development effort, the more likely it is that changes will have unforeseen consequences. Source control is the solution typically adopted in application development. It allows teams and managers to see what was changed, when, and by whom; as well as offering a sandbox, versioning, and rollback. When more than one developer is making modifications to a database, the whole team has all of these benefits. Sandboxes, in particular, are important, as they allow an individual developer to explore potentially breaking changes without disrupting the work of the team. However, team development introduces the possibility of conflicts. Source control systems make it easier to find and resolve them. The difficulty of database source control In application development, source code is kept under in source control so that each revision to a file is retained. However, database development is generally done by working directly with a database, rather than with script files. DML and DDL queries modify the current state of a database, so there are no files being changed. There is therefore no source code to control. Most existing methods for source controlling databases are workarounds. Source code is created artificially by scripting out database objects, or storing migration scripts - and this sits outside the database development cycle. Within the development workflow, scripts may be specifically created for migration and deployment, and those scripts can be checked into a source control repository. However, deployment scripts do not represent a practical history of incremental changes, and creating them regularly complicates the development process. Mature development projects will already employ a source control system. Finding a simple way to record database modifications in that system solves the change management problem by taking greater advantage of your existing infrastructure. So there is no need for an additional investment. Red Gate Software Ltd 3

Improving database development With Red Gate tools, the database development process becomes simpler and more unified: Database changes are source controlled alongside application code, where both can be versioned and become part of a continuous integration process. Tests can be run, and readily automated, as can schema documentation, and eventual deployment. The result is that higher quality development becomes easier, and requires less developer time. Improving the development environment SQL Server Management Studio is central to the SQL Server development and administration process. It is the industry standard IDE. There are alternatives - notably Visual Studio, used for developing application code - but they are not so closely tailored to database development. As SQL Server Management Studio is the preferred and recommended IDE, it makes sense to introduce productivity and process enhancements directly into that Red Gate Software Ltd 4

environment. Switching between tools is disruptive, and purchasing a new IDE is disruptive and costly. The Red Gate SQL development suite integrates directly with SQL Server Management Studio, to address two problems: individual productivity, and team processes. Productivity improvements The majority of database development time is, unsurprisingly, spent writing and maintaining SQL code, so this is the most obvious productivity bottleneck to address. SQL Prompt is a code auto-completion and layout tool. This makes writing SQL is faster and more reliable. Code maintenance is a different problem. Although SQL Prompt helps developers adhere to best practices and coding conventions by automating snippets and formatting, existing code must often be refactored. SQL Refactor augments the SQL Prompt functionality by automating table splits, renames, and other common, time-consuming refactorings. A modern database may contain hundreds if not thousands of objects, so writing code is only part of the productivity problem. Even with easily adopted naming conventions, just finding a specific object, or an object that references another can take time. SQL Search searches for SQL code across one or more databases, making it easier to work with large, complex schemas. Process improvements The cornerstone of Red Gate's database development process recommendations is the introduction of source control. Once source control is in place, it is easier to adopt continuous integration and unit testing. These are established best practice for application code, but have so far not been readily available for database development. SQL Compare and SQL Data Compare simplify migration and deployment, which in turn enables automation. Automated deployments, and the realistic data generation provided by SQL Data Generator make it easy to adopt database unit testing, as well as performance and integration tests. Red Gate Software Ltd 5

Red Gate's source control solution SQL Source Control is Red Gate's source control solution. It is not itself a source control system. But rather, it integrates an existing source control system with the database development workflow. SQL Source Control is an add-in for SQL Server Management Studio. It maintains a folder of scripts representing the structure of a database in source control. Database source control can therefore easily be adhered to, as the day-to-day steps such as committing changes have been simplified and brought into the existing workflow. Advantages of SQL Source Control The benefits of database source control are the same as the benefits of source control for application code. You can audit changes, seeing when, by whom, and why they were made. You can isolate those changes, and where necessary, roll them back. Each developer has a safe sandbox, changes are merged back into the central repository, and batches of changes can be collated into labeled versions. SQL Source Control is designed to eliminate the extra overhead of creating code to source control. Because it sits within SQL Server Management Studio and rapidly detects schema changes, committing those changes is simple and quick. The source control repository can therefore represent "the truth" - the latest version of the database incorporating all changes. Because SQL Source Control makes it easy to update a database with changes from source control, and commit changes to source control, it eliminates the need to create change scripts during development. On its own, this saves time and eases change management. Source control that is simple and unobtrusive is more likely to be used. Source control with a low barrier to entry is easier to adopt. Usable, accessible source control that sits within the existing development workflow is a cornerstone of good change management. Red Gate Software Ltd 6

Conclusion Red Gate's development suite presents an alternative to the traditional scenario in which database development is cumbersome, challenging, and out of step with application code. Adopting it improves productivity, change management, testing, and deployment, across the whole database development life cycle. The suite of tools described in this paper can be downloaded for a free 14 day trial Red Gate Software Ltd 7