Click here to monitor SSC

FatherJack

SQL Q+A forum at ask.sqlservercentral.com | Follow fatherjack on Twitter

Keeping a track of database changes

Published Wednesday, July 14, 2010 4:30 PM

If you are anything like me you work as part of a small team managing databases, doing a bit of web development, handling calls for technical support, attending countless meetings and about a hundred other things. Its long been a constant concern of mine that there are changes being made to databases that I manage that will one day trip me up. Someone will add just one too many columns to a table, or even drop a table, and an application will stop working. When was the change made, who made it, why, was it tested before it was rolled into live? Unless you are blessed with clairvoyant powers or have a psychic friend, you would be best getting over to RedGate software.

The worries about this sort of thing are greatly eased now that RedGate have created SQL Source Control. It's source control for your database, that you access from right inside Management Studio. It uses either Team Foundation Server (TFS) or Subversion (SVN) for the document store and your whole team can now update their own copies of a database and then merge changes safe in the knowledge that they have the most up to date, working schema in their hands.

The process could only be simpler if RedGate sent someone around to do it for you:

  1. Create or select a folder where the SVN repository is going to be stored
  2. Use TortoiseSVN to create a repository
  3. Select your candidate database in SSMS Object Explorer
  4. Link SQL Source Control to the repository folder

Done!

Any changes you now make in SSMS now get collected by SSC and you then get the ability to commit the changes to the repository at your convenience. If someone else in your team has made changes too then you can get the latest version from the repository and see if there are any conflicts and resolve them. The differences between different versions is also shown within SSMS so that you can see exactly what was changed.

Given that you make a series of changes to a dev database and commit these changes to the SSC repository and have run your tests to ensure its a workable set of updates you can then easily use SQL Compare to execute the scripts against your live server to move the changes into production.

RedGate have some videos of SSC in use and a few help files on their site here http://www.red-gate.com/products/sql_source_control/evaluation_center/index.htm and if you like what you see, you can grab a 28 day fully functional trial from the same place. RedGate's SQL Toolbelt is a suite of applications for the busy DBA and they have added SSC to that suite, this means existing customers get it for free, for anyone new to SQL Toolbelt, well, you are getting even better value, at last count there are 14 applications included. I would heartily recommend it.

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Twitter Trackbacks for Jonathan Allen : Keeping a track of database changes [simple-talk.com] on Topsy.com said:

July 14, 2010 7:40 PM
 

Nauman said:

Dear Fellow,
Is there any software for free that can track database changes, am using Source Safe for Application development but am suffering for database changes.

April 6, 2011 10:31 AM

What do you think?

(required) 
(optional)
(required) 

About fatherjack

DBA since 1999 working for not-for-profit company. http://twitter.com/fatherjack,
<July 2010>
SuMoTuWeThFrSa
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567
How to Kill a Company in One Step or Save it in Three
 The majority of companies that suffer a major data loss subsequently go out of business. David Wesley... Read more...

Migrating from OCS 2007 R2 to Lync: Part 4
 Having migrated the rest of our users and legacy resources across, and start getting ready to... Read more...

Automated Script-generation with Powershell and SMO
 In the first of a series of articles on automating the process of building, modifying and copying SQL... Read more...

Seth Godin: Big in the IT Business
 Seth Godin has transformed our understanding of marketing in IT. He invented the concept of 'permission... Read more...

Using SQL Test Database Unit Testing with TeamCity Continuous Integration
 With database applications, the process of test and integration can be frustratingly slow because so... Read more...