Connect your databases to your source control system

  • Plugs into SQL Server Management Studio
  • Source control your schemas and static data
  • See who made what changes, when, and why
Download 28-day free trial

An intro to SQL Source Control with SQL Server MVP Steve Jones

Introduction to SQL Source Control

SQL Source Control is an add-in for SQL Server Management Studio that links your database to your source control system.

Because it works with tools you already use, there’s no lengthy setup, yet it gives you the ability to source control schemas and reference data, roll back changes, and maintain the referential integrity of your database.

And it helps you solve other database challenges, like deploying without losing data.

See for yourself – try SQL Source Control free for 28 days

Pricing information

per user

Buy now

Save up to 30% when you buy multiple licenses

SQL Source Control is part of the SQL Toolbelt

Deploy straight from your repo, or kick off CI builds, with all our SQL Server tools

See what’s included

SQL Source Control works with

or any source control system with a command line

Key features of SQL Source Control

Source control at your fingertips inside SQL Server Management Studio

Source control at your fingertips inside SQL Server Management Studio

It’s easy to record and share your code changes, because SQL Source Control runs inside SQL Server Management Studio.

You don’t have to stop what you’re doing or pass round handwritten change scripts.

Source control your schemas and reference data

Source control your schemas and reference data

Store and share any SQL Server object and static data. Committing and updating takes two clicks in the Object Explorer.

To see what’s new, you can check changes down to the individual lines of SQL, with highlighted differences.

View a full history of changes

View a full history of changes

Look through the full revision history of a database or database object.

You can see who made the changes, when they made them, and why.

SQL Source Control maintains the referential integrity of your database

Handles referential integrity for you

When you commit or update, SQL Source Control maintains the referential integrity of your database for you.

It works out the right order for your changes and even deals with keys and constraints.

It uses the same engine as SQL Compare, the world’s most trusted tool for syncing database changes.

Push and pull from Git remote repositories

Push and pull Git repos

Synchronize your local and remote Git repositories inside Management Studio.

Pull down changes from your remote repository, commit your changes locally, and push straight them to your remote repository to share with the rest of your team.

Roll back and resolve conflicts from the Object Explorer

Roll back any changes you don't want

It’s simple to roll back and resolve conflicts from the Object Explorer.

This also gives you a risk-free sandbox. If you want to experiment on your database, go ahead. You can undo any changes you don't want to keep.

Lock objects in SQL Server Management Studio

Lock objects you're working on

You can lock the object you're working on in SQL Server Management Studio with just one click, so your changes are safe from being overwritten.

Your team can see what's locked, as well as information on who locked it.

Read more about locking in this blog post.

Work on a central database or your own local copy

Work on a central database or your own local copy

You and your team can work on a shared database or each use a local, dedicated copy.

SQL Source Control supports both models for database development.

Either way, it helps you share code, avoid conflicts, and see who’s doing what, so you can work without treading on each other’s toes.

Exclude objects with filters

Exclude objects with filters

If you don't want to share certain objects, such as users or permissions, you can exclude them with filters.

You can exclude objects by type, name, and owner, or specify more complex conditions.

It's simple to share only what you want with your team.

How SQL Source Control helps with development and business processes

Deploy your database straight from source control

Avoid errors and stop those 4am deployments

Deploying database changes is nerve-wracking. You have to make certain that nothing breaks and you have to minimize downtime. When something does go wrong, you’re responsible and it can be hard to fix.

So for a lot of us, deployment means queuing up changes, coming in early (or staying late), and crossing our fingers that nothing goes wrong.

SQL Source Control gives you an alternative: deploy from a canonical version of your database in source control. You’re working with a stable version, which cuts the risk of deploying incomplete or incorrect changes.

Deploy from source control using SQL Compare Pro

Deploy straight from your repository

You can make deployments from your repository with SQL Compare Pro, or automate the process with DLM Automation.

SQL Compare writes deployment scripts in minutes, making your release safe and efficient. You can deploy from SQL Compare or copy the script to review and run later. You can use SQL Compare to generate rollback scripts too.

With DLM Automation, you can set up an automated deployment process for your database, using your existing release tool, such as Octopus Deploy.

“I'm anxious to get SQL Source Control up and running as I know the only way to deliver high quality SQL code is by having it under a SCM tool, vigorously testing, (thank you for SQL Test) and being able to confidently and consistently build/deploy the code.

There is so much that Redgate is doing to make Agile Database Development a reality. I'll finally be able to tell my AppDev friends to stow it when they say that database development can't be agile.”

Paul Hunter, NightOwl Development

Track progress and pass any audit with a full change history

View a full change history

Keep an eye on database changes and track development progress

Without version control, it’s almost impossible to keep track of development.

What work has your team completed? How did your database reach its current state? Who just broke the build – and how are you going to fix it?

To help you answer these questions, SQL Source Control gives you a full change history for your database and for every object in it.

It shows you who made changes, when they made them, and why. You stay up to date with progress and you get complete oversight of the changes that go into production.

Pass any audit and prove regulatory compliance

A well-documented change management process is also essential to win the trust of auditors or investors.

With a complete record of development changes in SQL Source Control, you can pass audits and prove you comply with standards such as Sarbanes-Oxley or HIPAA.

“If we can prove we can track the entire history of our data’s lifecycle, we’ll pass any audit. If not, we face massive fines, legal charges, suspension from trading, and possible termination of the company. Faced with that, how could I afford not to source control my database? How could anyone?”

Lynton Mack, DBA, Cameco Corporation

Download our whitepaper

For more on how SQL Source Control helps you meet your compliance requirements, read our 4-page whitepaper Compliance: what it means for databases (PDF).

Take the first steps in continuous integration for databases

What if you want to do some really clever stuff with your database, like continuous integration?

With your database in version control, you have the basics in place.

A full continuous integration process should build and test everything your project relies on, so SQL Source Control works with our SQL Toolbelt to help you test your application and database code side by side.

Using both Suites, you can set up a CI process that updates a test database with your changes (or creates a fresh database from your source files). This keeps application and database development in step and makes sure your project still works when you bring everything together.

Testing your changes up-front means you spot and fix errors early on. Bugs don't have a chance to leave development, let alone make it to production. Your code is shared as soon as it passes the test, so there are no painful merges. Instead, you can build on each other's work as soon as possible.

Our tools for database CI work with the build server you already use and come with plugins for Team Foundation Build and TeamCity, to make setup straightforward.

“Redgate's SQL Source Control gives us the ability to track and document changes, while SQL Compare and SQL Data Compare have enabled us to bring SQL Server to the continuous integration party that the rest of the department depend on.”

Philip Bates, Senior Database Developer,

Download our whitepaper

For a close look at database continuous integration, read our 17-page whitepaper Continuous integration for databases using Redgate tools: An overview (PDF).

It explains:

  • What continuous integration is and why it helps
  • How to solve some specific problems for database CI, such as keeping your data safe
  • How to set up the full process step by step

What our customers are saying



SQL Source Control - an intro with Steve Jones

Steve Jones, SQL Server MVP and founder of SQL Server Central, explains how to share simple database changes between developers, using Team Foundation Server, SQL Server Management Studio, and Redgate SQL Source Control.

Watch fullscreen video

How to push database changes to a Git remote repository

SQL Server MVP Steve Jones shows you how to push changes to a Git remote repository straight from SQL Server Management Studio using Redgate's SQL Source Control.

Watch fullscreen video

How to pull database changes from a Git remote repository

SQL Server MVP Steve Jones shows you how to pull changes from a Git remote repository straight into SQL Server Management Studio using Redgate's SQL Source Control.

Watch fullscreen video

How to lock objects in Redgate SQL Source Control

Microsoft MVP Alessandro Alpi explains how to use the new locking feature in Redgate SQL Source Control 4.

Watch fullscreen video

Getting started guide

How to set up SQL Source Control

This short guide shows you how to set up and use SQL Source Control with your database and Team Foundation Server, Subversion, or Git, as well as how to get started if you don’t have a source control system.

It covers how to:

  • Link your database to source control
  • Make an initial commit
  • Commit a change
  • Get a change
  • Set SQL Source Control options and share them with your team

Read the guide (PDF)

There are also individual guides that show you how to set up SQL Source Control with Team Foundation Server, Git, Subversion, and without source control.

Case studies

How healthcare tech company Practice Fusion saves $25,000 a year with SQL Source Control and database continuous integration

Practice Fusion provides doctors, pharmacies, and labs with health records for 75 million patients across the US.

Its development team uses SQL Source Control, SQL Compare, and Jenkins to build, test, and deploy database changes.

This makes deployments simple, stops unauthorized changes to their production servers, and saves Practice Fusion $25,000 a year.

Read the case study (PDF)

"SQL Source Control made an immediate impact and saves us hours and hours of time during deployments. We’re now sure we can deploy changes with virtually zero errors."
Phil Collins, Head of IT, HospitalityGEM

Find out how HospitalityGEM, a UK-based guest experience management company, resolved the issue of long, unpredictable deployments by introducing SQL Source Control alongside other DLM tools from Redgate.

Read the case study (PDF)

"Thanks to Redgate tools, we're meeting our KPIs with a much more reliable system, fewer bugs, and an integrated workflow."
Chen Li, Senior Systems Analyst, Phillip Securities Pte Ltd

See how Phillip Securities, a Singapore-based retail broker, increased the reliability of their database deployments by adding version control and Redgate's DLM tools.

Read the case study (PDF)


How to set up continuous integration for databases with Redgate tools

How to add a SQL Server database to your continuous integration process

A worked example, using SQL Source Control and Redgate SQL CI (part of DLM Automation)

Read the whitepaper (PDF)

The business benefits of SQL Source Control

This 4-page whitepaper explains the commercial advantages of using SQL Source Control, including:

  • Visibility over progress in software development
  • Simple compliance and auditing
  • Time savings for developers, DBAs, and BI teams

Read the whitepaper (PDF)

How SQL Source Control versions your database objects

Database source control is hard because there isn’t any source code. Instead, your queries change the state of the database.

SQL Source Control solves that problem by scripting each database object into a file in your version control system.

It’s possible to do this with an elaborate manual workaround, but SQL Source Control makes it easy for you in three ways:

  1. You don’t need to leave SQL Server Management Studio – you can do it all with a few clicks in the Object Explorer.
  2. You don’t need to remember to script out your files or instil that habit in new team members. SQL Source Control highlights your changes in the Object Explorer, so you see what’s sitting outside source control at a glance.
  3. You don’t have to worry about referential integrity or data persistence. SQL Source Control sorts out the order of your changes and deals with keys and constraints for you. With migration scripts, you can specify how to deal with complex changes that affect your data, such as table splits.

When you’ve made your changes, you check them in with a couple of clicks, just like you would for your application code. SQL Source Control scripts out files that represent the new state of each object and saves them in your version control system.

Not only is it simple to share your work – you also have a history of every change to every object in your database, along with details of who made each change, when, and why.

“Before using SQL Source Control, we'd tried a whole bunch of things. Sometimes we passed around manual backups, or SQL CREATE scripts, but that meant only one developer could work on the database before we had to issue updates again. We tried Database projects in Visual Studio, but they were clunky, and rather fragile when we made substantial changes.

One of our developers eventually cooked-up his own sync tool. It was a time consuming project. We had to teach new developers how to use it, enforce certain conventions, and it only really worked when source and target could be accessed at once, which wasn't often.

SQL Source Control did everything that sync tool could do, without wasting time or causing frustration...Integration with SSMS and TFS saved us a lot of hassle, but the major benefit has been the time it’s saved us making and pushing database changes. I'm not sure I could give that up again.”

Phil Gale, Red Jungle
Read more
DLM: Source control

One of Redgate’s Database Lifecycle Management tools

Want to improve how your organization develops databases? SQL Source Control gives you database source control, the bedrock of any process improvements. With it, you’ve got everything you need to think about the next step – continuous integration.

For more process and business benefits, visit our source control overview.