Red Gate logo

Put source control at your fingertips inside SQL Server Management Studio

Download 28-day free trial

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

$495

per user

Buy now

SQL Source Control works with

  • Team Foundation Server
  • Subversion
  • Git
  • Vault
  • Mercurial
  • Perforce

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.

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.

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.

Commit to a central database or your own local copy

Commit to 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.

SQL Source Control works with

or any source control system with a command line

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 straight from your repository with SQL Compare Pro

You can deploy directly from your repository with SQL Compare Pro. It writes a deployment script for you in minutes, making your release safe and efficient. You can use it to generate rollback scripts too.

SQL Compare Pro is the world’s most trusted tool for manual deployment of SQL Server databases (71% of the Fortune 100 use it). You can rely on your deployment being flawless.

Deploy from source control using SQL Compare Pro

“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 Red Gate 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

Read on: Track progress and pass any audit with a full change history

Track progress and pass any audit with 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.

View a full change history

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).

Read on: Take the first steps in continuous integration for databases

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 and Red Gate’s SQL Automation Pack help you test your application and your database code side by side.

When you commit a change, it starts a CI process that updates a test database with your changes (or create 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 TeamCity, MSBuild, and NAnt, to make setup straightforward.

“Red Gate'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,
Laterooms.com

Download our whitepaper

For a close look at database continuous integration, read our 17-page whitepaper Continuous integration for databases using Red Gate 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

Our technical partners

The industry standard for SQL Server version control

Videos and Resources

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)

"Thanks to Red Gate 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 Red Gate's DLM tools.

Read the case study (PDF)

Whitepapers

How to set up continuous integration for databases with Red Gate tools

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

A worked example, using SQL Source Control and Red Gate SQL CI

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)

Webinars

How to set up SQL Source Control

The basics of working with SQL Source Control:

  • Adding schemas and data to your source control system
  • Sharing your development changes
  • Reviewing your change history

Watch fullscreen video

How to deploy complex changes without losing data

How SQL Source Control and SQL Compare help with:

  • Keeping your data safe when you make changes such as table or column splits
  • Sharing complex changes with your team
  • Deploying them to production servers without losing data

Watch fullscreen video

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.

“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

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.

Read more
DLM - Stage 2: Source control

One of Red Gate’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.