Product articles Database Builds and Deployments

Solving the Provisioning Problem in Database Development using Clones

When database development is described, the details often get vague when the data gets beyond spreadsheet-size. There is 'hand-waving' talk of providing databases for each developer, but little detail of how you would provision all the databases that would be needed, at the correct version and with the correct development data, and then keep them all in sync with the source code, as developers commit changes. This article explains the requirements, and how SQL Clone can meet them. Read more

Using Filters to Fine-tune Redgate Database Deployments

Filters are used by Redgate's SQL Compare, SQL Source Control, DLM Dashboard, and SQL Change Automation. A typical use for a filter is to work on just one schema within a database or just a limited set of tables and routines. You would also want to use a filter to exclude certain object, such as database users, from comparisons. Phil Factor explains how they work, and how to create, edit and then use them within the various Redgate tools. Read more

Simple Database Development with SQL Change Automation

SQL Change Automation makes automation simple enough that it can adapt to suit many different approaches to SQL Server database development. Phil Factor describes a project to update the Pubs database, using it in combination with a PowerShell function and to maintain in source control the build scripts, migration scripts and object-level scripts, for every version of the database. Read more

Automating Oracle Database Deployments using the Hybrid Approach

Stephanie Herr explains how to use the 'hybrid' approach in the Deployment Suite for Oracle to automate Oracle database deployments. This is where the team maintains the current state of the database in version control during development. then, at key stages, they generate and test the migrations script that will be used to deploy the new database changes safely. Read more

Allowing for manual checks and changes during database deployments

SQL Change Automation enables users to make database changes to production safely and efficiently using PowerShell cmdlets, which can be integrated easily into any release management tool. This article will show you how to automate database deployments safely, by using SQL Change Automation from within PowerShell scripts, and how a deployment script for a release can be checked and amended as part of the process. Read more

Database Build Breakers: Avoiding Constraint Violations during SQL Server Deployments

A common database build breaker is data that violates the conditions of any of the CHECK, UNIQUE or FOREIGN KEY constraints, and unique non-clustered indexes, designed to protect the consistency and integrity of your data. Phil Factor explain how to avoid this problem, using SQL Compare and some custom stored procedures to discover which rows will cause violations, and fixing them, before running the build. Read more

Deploying Data and Schema Together with SQL Compare or SQL Change Automation

You want to use SQL Compare or SQL Change Automation (SCA) to create or update a database, and at the same time ensure that its data is as you expect. You want to avoid running any additional PowerShell scripting every time you do it, and you want to keep everything in source control, including the data. You just want to keep everything simple. Phil Factor demonstrates how it's done, by generating MERGE scripts from a stored procedure. Read more

Database Build Blockers: Mutually Dependent Databases

Phil Factor demonstrates a clever way to create 'stub' objects, in SQL Change Automation pre-deployment scripts, in order to overcome the problems caused by 'missing objects' when building databases that have circular, or mutual, dependencies. In the subsequent deployment, SQL Change Automation fully builds every object in each of the databases, so all dependencies are fully tested. Read more

How to create and refresh development and test databases automatically, using SQL Clone and SQL Toolbelt

Phil Factor shows how a set of Redgate tools can be used together, via PowerShell, to build a database from object-level source, stock it with data, document it, and then provision any number of test and development servers. Before tearing down and rebuilding a database to a new version, we take care to save any DDL changes made to the existing copy. Read more

How to reformat a database in one operation

Inherited a database from another team? Changed your team policy on the way that you format SQL? What's to stop you formatting the code of an entire database nicely, when you're developing it? Manually, the process can take longer than you expect. Phil Factor demonstrates a simple 3-step approach to reformatting a whole database , in a single operation, using SQL Compare and SQL Prompt. Read more