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



Similar documents
Choosing the Right Way of Migrating MySQL Databases

DFW Backup Software. Whitepaper DFW Backup Agent

Zoner Online Backup. Whitepaper Zoner Backup Agent

Ahsay Backup Software. Whitepaper Ahsay Backup Agent

Whitepaper FailSafeSolutions Backup Agent

Blaze Vault Online Backup. Whitepaper Blaze Vault Online Backup Agent

DataTrust Backup Software. Whitepaper DataTrust Backup Agent. Version 6.3

Continuous integration for databases using Red Gate tools

Swiss Safe Storage Online Backup Whitepaper Swiss Safe Storage Backup Agent

What s New Guide: Version 5.6

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

WHITEPAPER. Improving database development

Continuous integration for databases using

Embarcadero DB Change Manager

Embarcadero DB Change Manager 6.0 and DB Change Manager XE2

Real-time Data Replication

SurfCop for Microsoft ISA Server. System Administrator s Guide

Implementing Microsoft SQL Server 2008 Exercise Guide. Database by Design

KonyOne Server Installer - Linux Release Notes

Continuous integration for databases using Redgate tools

Data Generator for SQL Server User's Manual EMS Database Management Solutions

Jet Data Manager 2012 User Guide

PAINLESS MULTI-DBMS STRATEGY For Magic Developers

How to set up SQL Source Control. The short guide for evaluators

VMware vcenter Update Manager Administration Guide

RDS Migration Tool Customer FAQ Updated 7/23/2015

LEARNING SOLUTIONS website milner.com/learning phone

Guide to Setting up Docs2Manage using Cloud Services

Toad Data Modeler - Features Matrix

SQL Server Replication Guide

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

Computer Visions Course Outline

Consolidate by Migrating Your Databases to Oracle Database 11g. Fred Louis Enterprise Architect

Installation Guide for contineo

MySQL Administration and Management Essentials

Comparing Microsoft SQL Server 2005 Replication and DataXtend Remote Edition for Mobile and Distributed Applications

Oracle SQL Developer Migration. An Oracle White Paper September 2008

Backup and Recovery of SAP Systems on Windows / SQL Server

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

PassTest. Bessere Qualität, bessere Dienstleistungen!

Setting Up Exchange. In this chapter, you do the following tasks in the order listed:

IceWarp Server Windows Installation Guide

Version Control Using Subversion. 12 May 2013 OSU CSE 1

Basics Of Replication: SQL Server 2000

Upgrading from VAM/SQL MS303 to VAM/SQL MS401

Database Replication with MySQL and PostgreSQL

Print Audit 6 Network Installation Guide

VMware vcenter Update Manager Administration Guide

Evaluation Checklist Data Warehouse Automation

Configuring an Alternative Database for SAS Web Infrastructure Platform Services

HP Device Manager 4.7

126 SW 148 th Street Suite C-100, #105 Seattle, WA Tel: Fax:

K-Backup: Network automatic backup data to free iscsi SAN

MySQL Comes of Age. Robert Hodges Sr. Staff Engineer Percona Live London November 4, VMware Inc. All rights reserved.

NetWrix SQL Server Change Reporter. Quick Start Guide

MS Design, Optimize and Maintain Database for Microsoft SQL Server 2008

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

Wise Package Studio 5.5 Feature Grid

Integrating Salesforce Using Talend Integration Cloud

Selecting the Right Change Management Solution Key Factors to Consider When Evaluating Change Management Tools for Your Databases and Teams

Managing Third Party Databases and Building Your Data Warehouse

I. Application background

What is Enterprise Architect? Enterprise Architect is a visual platform for designing and constructing software systems, for business process

3. Where can I obtain the Service Pack 5 software?

SQL Server Developer Training Program. Topics Covered

Implementing a Data Warehouse with Microsoft SQL Server MOC 20463

COURSE OUTLINE MOC 20463: IMPLEMENTING A DATA WAREHOUSE WITH MICROSOFT SQL SERVER

StreamServe Persuasion SP4

Tableau Metadata Model

Work. MATLAB Source Control Using Git

Best Practices. Integration of CRM and QuickBooks

Essential Visual Studio Team System

Course 6232A: Implementing a Microsoft SQL Server 2008 Database

HP Quality Center. Upgrade Preparation Guide

Implementing a SQL Data Warehouse 2016

"Charting the Course to Your Success!" MOC B Configuring and Administering Microsoft SharePoint Course Summary

Continuous Integration (CI)

WhatsUp Gold v16.2 MSP Edition Deployment Guide This guide provides information about installing and configuring WhatsUp Gold MSP Edition to central

Custom Software Development Approach

AWS Schema Conversion Tool. User Guide Version 1.0

Database as a Service (DaaS) Version 1.02

Exploring SQL Server Data Tools in Visual Studio 2013

Top 10 Oracle SQL Developer Tips and Tricks

Oracle SQL Developer Migration

East Asia Network Sdn Bhd

Compliance Procedure

SQL Object Level Recovery Native 1.1

Migrate Topaz databases from One Server to Another

SSC2016: SharePoint 2016 Administrator s Survival Camp

Designing, Optimizing and Maintaining a Database Administrative Solution for Microsoft SQL Server 2008

Implementing a Data Warehouse with Microsoft SQL Server

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

TSM Studio Server User Guide

Implementing a Data Warehouse with Microsoft SQL Server 2012

KASPERSKY LAB. Kaspersky Administration Kit version 6.0. Administrator s manual

CA XOsoft High Availability for Windows

Xopero Centrally managed backup solution. User Manual

VBA and Databases (see Chapter 14 )

Designing Database Solutions for Microsoft SQL Server 2012 MOC 20465

COURSE 20463C: IMPLEMENTING A DATA WAREHOUSE WITH MICROSOFT SQL SERVER

Transcription:

Tracking Database Schema Changes Guidelines on database versioning using Devart tools

Table of Contents Introduction...3 Typical Development Environments...3 Database versioning problems...4 Improving database schema development...4 Putting a database schema under a version control...4 Making changes to a database schema...6 Committing changes to a version control system...7 Conclusion...9 About Devart...10 Devart 2010 2

Introduction This white paper examines problems that any developer can meet when changing a database structure, integrating structure changes made by other developers, and moving the database from one environment to another. The document also introduces a solution from Devart, a vendor of handy tools to provide native connectivity to popular databases, and facilitate their development and management. The recommendations, provided in the white paper, target any developer team that develop Microsoft SQL Server databases and wants to improve the work with efficient tools. Typical Development Environments Database development process typically involves four types of database environments shown on Figure 1. They are sandbox, development environment, UAT environment, and production. Sandbox Figure 1 Database development environments This is a special-purpose type of development environment that is, in theory, developed for each developer separately. In the sandbox a developer can freely experiment with a database and make any modifications to complete the tasks. Devart 2010 3

Development environment This special-purpose development environment integrates changes made by all the developers involved in the project. Big companies usually work on several projects and, therefore, several integrated development environments may exist. Deploying such environments is common, sometimes it happens several times a day. User acceptance testing environment This is a special-purpose type of development environment created on database predeployment stage. Providing real conditions to test the database functionality, this environment allows getting specific feedback results before deploying the database to the production server. Deploying such environments is controllable so a developer can check the correctness of deployment methods used. Production This is a final type of database development environment. Production database deployment is strictly controlled by an administrator who is in charge of deployment steps and the result. Database versioning problems Any of aforementioned database development environments has its database modification. This means that during project development at least four database modifications can exist. This brings significant complexity during change management and an additional load for developers. Here are some common challenges following database change management: 1. Integrating changes made by different developers. 2. Rolling back changes selectively in case of any errors. 3. Detecting what database modification is in each development environment. 4. Matching feedback results with a database modification being tested. The situation becomes worse when no version control system is used during database development. This is still a common thing, especially for small projects. Improving database schema development One of effective solutions to improve database schema development includes usage of dbforge Schema Compare for SQL Server, a tailored tool from Devart to facilitate comparison and synchronization of MS SQL Server databases. The following recommendations on improving database schema development Putting a database schema under a version control The first thing required to improve database development is to put a database under a version control system. It takes making a database snapshot. Even if you have already added deployment scenarios into the version control system, follow this recommendation. In many cases, as it is more convenient to make changes in a database itself, developers change the developers do this and ignore deployment scripts. Devart 2010 4

Figure 1 - Version control alias for Subversion To put a database under a version control by using dbforge Schema Compare, three steps are required: 1. In the Version Control Alias Properties dialog box, set up a version control alias that points the working directory where a database schema is stored. (Figure 2 illustrates the created alias for Subversion.) Pay attention that you should specified a valid directory that exists on the disc and contains checked-out files. In the Create Schema Snapshot dialog box, select a database modification that will be a baseline and set up all necessary parameters to create a database snapshot (see Figure 3). Devart 2010 5

Figure 2 - Schema snapshot creation 2. Press Create and dbforge Schema Compare will create a database snapshot and automatically put it under a version control system based on the specified alias. Making changes to a database schema When the database is under a version control system, you can modify the database structure in 'the sandbox'. Database modifications are rarely separate, usually they consist of quite a few interconnected changes. For example, DROP COLUMN operation may require the following: Redefining foreign keys Correcting broken views Correcting broken triggers and stored procedures Mostly, after changing a database schema, a developer cannot just commit the changes into a version control system. The changes made by other developers, who are working on the same database, might conflict. That's why it is necessary to compare the modified copy of Devart 2010 6

the database with the latest revision in the version control repository before committing. It is a simple procedure with dbforge Schema Compare for SQL Server. It takes only to select required source and target and start a comparison (see Figure 4). Figure 4 - Comparing developer changes with repository Checking that there are no conflict changes or having solved the conflicts if any exist, the developer can commit the database changes to the version control system repository. Committing changes to a version control system Based on a project strategy, database deployment scenarios can be stored in a version control system in two ways: 1. The version control system repository stores deployment scenarios of the latest database revision. This variant presupposes database deployment from scratch, i.e. while updating a database, you should a backup of the previous database revision, deploy a new database revision, then insert data. Moving data from one database to another can be facilitated by dbforge Data Compare for SQL Server, a special-purpose tool for MySQL data migrating. 2. The version control system repository stores deployment scenarios for a baseline database version as well as for its revisions. Devart 2010 7

In this case you can deploy the database either from scratch or by using a certain revision, i.e. you can do incremental deployment. Regardless of the selected project strategy, it is convenient to store a holistic database snapshot and use it to track a database revision. Especially it is beneficial when the version control system repository stores deployment scenarios for a baseline database version as well as for its revisions. When committing database revisions, dbforge Schema Compare for SQL Server offers the Schema Synchronization Wizard (see Figure 5) to make this task in a quickly and accurate manner. Figure 5 - Committing the new revision of schema snapshot Devart 2010 8

Conclusion Devart's dbforge for SQL Server product line presents database development and change management tools for streamlining development processes. The tools boost productivity across the whole development cycle. Free 30 day trials of the described tools are available for download: Schema Compare for SQL Server - http://www.devart.com/dbforge/sql/schemacompare/ Data Compare for SQL Server - http://www.devart.com/dbforge/sql/datacompare/ Devart 2010 9

About Devart Devart (formerly known as Core Lab) is a software development company founded in 1998. It is a provider of native connectivity solutions, development and administration tools for Oracle, SQL Server, MySQL, PostgreSQL, InterBase, Firebird, and SQLite databases. It is a partner of such software providers as Microsoft and CodeGear and participates in MySQL Network Program. Devart is dedicated to delivering the fastest available data access and the broadest database support to industry professionals. Company Web Site: www.devart.com Devart 2010 10