Compare the schemas of two SQL Server databases using SQL Compare command line then quickly produce a diff report showing you immediately which tables, views and functions have changed. Read more
If you have SQL Compare, then the SQL Snapper utility is very valuable 'extra' for certain team activities, because it can be freely distributed. It means that any developer can create a SQL Compare snapshot from databases that are on their local workstation and store them on the network. Read more
SQL Compare and SQL Data Compare can be used together, from the command line, to provide a complete build process, or to script out changes to both the database and its development data. For doing this routinely, I find it easiest to script the operation using PowerShell. Read more
Phil Factor explores a lesser-known capability of SQL Compare, which is to help you maintain a 'traditional', well-documented, single file build script, for creating the current version of the database during development. Read more
Phil Factor describes the problem of preserving data that is left 'in limbo' when you need to revert the database to a previous version that has no way of accommodating it. Read more
Cross-server references keep cropping up as a problem for development and build. Phil Factor demonstrates how using linked server 'aliases' can get around these issues, even if the individual databases use four-part references within the code rather than synonyms. Read more
Ami Adler, a Software Development Manager at Datafaction explains how they used Redgate tools, and others, to introduce automation and testing into their Database DevOps processes and so achieved a faster and more reliable deployment process for their application. Read more
SQL Compare has a simple premise: it will compare the two SQL Server databases for schema differences. It will generate a script that will make the schema of a target database the same as that of the source database. This article explores all the ways this can be helpful during database development and deployment, from generating database scripts in version control, to detecting database drift, to auto-generating deployment scripts. Read more
How can you use GitHub to do team-based database development? This article proposes a process that splits development work into task-based GitHub branches, incorporates daily database builds and integration testing, and uses Redgate tools to automate tasks such as provisioning, database scripting, and testing. Read more
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
If some of your database constraints have system-generated names, they can cause 'false positives' when comparing schemas and generating build scripts using SQL Compare or SQL Change Automation. Phil Factor explains the difficulties, and the Compare option you need to enable to avoid them. Read more
Phil Factor tackles the tricky questions you will need to answer when deciding how to automate your SQL Server database builds and deployments with Redgate's development, version control and deployment tools. Read more
Phil Factor provides a powerful DOS batch script which, when coupled with SQL Compare CLI, allows you to build databases from source, during development, and fill them with the specific datasets required for testing. Read more
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
Giorgi Abashidze explains how his team use a 2-phase deployment process with SQL Compare Command line, and some SQL Synonyms, to automate custom deployments for each of their customers, while only needing to maintain one branch per release in source control. Read more
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
Giorgi Abashidze explains how his team use SQL Compare Command line to automate database deployments for their customers, without having access to the real staging or production databases, merely by using our development database contained under TFS Source Control. Read more
Phil Factor describes how custom pre- and post-deployment scripts work, when doing state-based database deployments with SQL Compare or SQL Change Automation, and how you might use them to, for example, add a version number to the target database, specify its database settings, or stuff data into some tables. Read more
Phil Factor demonstrates how using XML argfiles to pass parameters to SQL Compare cuts out a lot of the tedious scripting involved in modifying a database schema comparison and deployment process, as required for each target database. Read more
SQL Compare is the industry standard tool for comparing and deploying database schema changes, and version 14.0 now provides a Command Line Interface (CLI) on Linux (available as a beta, at time of writing). Teams working with SQL Server on Linux, or across multiple platforms, benefit from seamless development processes, driven by SQL Compare, without Read more
A simple way of automating SQL Server database schema comparison and deployment tasks for multiple databases, by saving the options and configuration settings for each deployment in a project file and executing them from a PowerShell script. Read more
SQL Compare now includes a Linux-based command line interface (CLI), as well as a Windows-based one, for doing schema comparison and deployments of SQL Server databases. This article offers worked examples of CLI scripts for various schema comparison tasks, to get you up and running with either version. Read more
This article demonstrates how to use a 'state' approach to database source control, when the nature of the database changes cause you to hit difficulties with migrating existing data. These difficulties happen when the differences are such that it is impossible for any automated script to make the changes whilst preserving existing data. Read more
Database deployments, like the sheep of exasperated hill-farmers, often find strange and unexpected ways to self-destruct. Phil Factor describes the most common things that can go wrong, and how a reliable automated database build process can prevent messy accidents. Read more
A PowerShell automation script to build a SQL Server database from source control, seed it with dummy data, document it, and then deploy copies to any number of test and development servers. Read more
During the proof-of-concept phase of development work, SQL Compare Snapshots offer an easy way to work out what broke, if a change causes some tests to fail, as well as a simple ‘roll back’ technique to return quickly to the last working copy. Read more
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
Describing SQL Compare's built-in Active Directory Authentication mode, which makes it easier and more secure to, for example, deploy schema changes from version control to an Azure SQL Database. Read more
Tony Davis shows how to get a database, plus any static data, into source control, and then uses the "/include:StaticData" switch in the SQL Compare Pro command line, fromPowerShell, to automate the process of creating a new build script. Read more
How to use SQL Compare Pro command line with PowerShell to automate the processes of getting a new database into source control, updating the source with the latest database changes, creating a new build script for a database version, and creating a deployment script to synchronize an existing database with source. Read more
How to use the SQL Compare Pro command line to automatically compare the schema of two versions of the same database, and then subsequently deploy to the target database any differences detected in the source database. Read more
The final part of Alex Yates's three-part series tackles the complicated issue of automating deployments when the same table might have a different structure, in different production versions of the database. Read more
How to extract a database migration script, or a database build script, from a DacPac and then use it in a PowerShell-automated database deployment. Read more
In Part 2 of his series, Alex Yates shows how to use a combination of post-deployment scripts to handle cases where a code object exists in multiple production instances, but in different states. Read more
How to use filters in SQL Compare to avoid deploying objects that exist only in the source to databases where they may not be required or appropriate. Read more
How to compare SQL databases using DACPACs, script out differences and then run a database deployment task to synchronize the schema of the target database. Read more
SQL Compare provides a command line interface (CLI) for running database schema comparisons and generating a deployment script, as part of a scripted process. I'll demonstrate how to do this with a 1-click process, using a batch (.bat) file. Read more
SQL Compare can help you compare two databases that have In-Memory objects, the tables, their indexes and any natively-compiled procedures, and generate the appropriate scripts. Read more
As you test your row-level security in various environments, you can use SQL Compare to script out and deploy those changes to other databases. Read more
SQL Compare works with dynamic data masking, detecting the differences in masks across tables and generating the T-SQL you need to deploy your masking configuration to other databases. Read more