30.06.2013 Views

SQL Server Team-based Development - Red Gate Software

SQL Server Team-based Development - Red Gate Software

SQL Server Team-based Development - Red Gate Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 3: Change Management and Source Control<br />

Figure 3-3: Committing database objects to source control with <strong>SQL</strong> Source Control.<br />

<strong>Red</strong> <strong>Gate</strong> <strong>SQL</strong> Compare<br />

If you are not using <strong>SQL</strong> Source Control, an alternative is to script out the database<br />

using <strong>Red</strong> <strong>Gate</strong>'s <strong>SQL</strong> Compare tool. At its most basic, <strong>SQL</strong> Compare is a utility for<br />

directly comparing the structure of one database against another, then generating a<br />

script that reflects the difference between the databases, in order to make one database<br />

look like another.<br />

Building straight from one database to another doesn't allow for source control or a lot of<br />

process automation, but <strong>SQL</strong> Compare also allows you to create a script folder, in which<br />

it can generate the scripts needed to recreate the database and its objects. These scripts<br />

can then be put into source control, and <strong>SQL</strong> Compare can compare the scripts to a live<br />

database, and create a synchronization script to update that database.<br />

84

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!