Kevin Trethewey

Software Developer, Technologist, Connoisseur of things that go 'bing'.

  • Home
  • Contact
  • Links
  • About

SQL Change Control

Published Thursday, December 23, 2004 9:45 AM
I have an idea for a utility I would like to write as a way to practice TDD and some other agile methodologies I have been reading up on, with a view to releasing it as an open source solution when i am done. I am not sure though if there is anything already out there which will suit the purpose. If you do know of something available, or a better alternative to solving my problem then please post in my comments section…

We have 10 sites running a WinForms based system each connecting to a local SQL2000 server. We use the application updater block to deploy new versions of the application to each site – with some additional tweaks to support decent change control. Updating the schema (or data) of the DB is not quite so easy though. All the SQL instances are accessible on the WAN, so when a change is required this means opening a connection to each instance in ISQL and running an update script. This is not a suitable solution though because it is too easy to miss a site, and there is no way of knowing which scripts were run where and what the last script to be run on any given DB was.

The solution I propose is a simple WinForms utility with an XML data store. You add a list of sites to the app (in the form of a SQL connection string or such). Then when you have a new script to run, you add it to the app and press play. The app then runs the script on each individual site and reports the success or failure, with the option of automatically rolling back the transaction at all sites if any one of them fails to succeed. The app also assigns the script a reference number and saves it to its XML data store. It also records the date and time the script was run for each site so that you can go back and see when changes were made, as well as see the last change that was made. Should you not wish to update a particular site within a run you should be able to unselect it from that run, but then when you do want to update that site the app should enforce a rule that all scripts are successfully run in the order in which they were added to the system. The XML data store could possibly be checked into source control.

What do you think? This app would certainly be useful to me; would anyone else find any use in it? Am I missing the point completely? Does something out there already provide this functionality (for free)?

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
by Kevin Trethewey

Comments

# Pieter Jansen van Vuuren said on Thursday, December 23, 2004 11:05 AM

We have a similar situation and have actually discussed something in the line of what you proposing. I will most definately be interested!

# ilo said on Thursday, December 23, 2004 11:07 AM

I'm not if something like that exists or not, but I can promise you, if you do this, I'll be the first one to download it!

# John said on Thursday, December 23, 2004 1:40 PM

Dude, I wrote something like this in 20 minutes the other day, while I was sitting on the crapper with my notebook. I'll send you the source..

# KevinT said on Thursday, December 23, 2004 2:17 PM

Thanks 'John'. I wasn't implying that this was a major project or that this was the only functionality i could imagine adding, but just that my crapper time is valuable to me and i didn't want to waste it reinventing the wheel.

# Andre Odendaal said on Friday, December 31, 2004 2:34 PM

What would be really nice was that if I later added another site, I had the option of running the scripts that have been run for other sites through your app, in the order that they were loaded.

# Chris 'Down the hallway' Baker said on Thursday, January 27, 2005 1:55 PM

Dude, I have something similar that I wrote for this exact problem - in actual fact it is so similar to your problem that it is in fact related to the exact project.

Still - I wrote the Excecutioner. I have it on a shared folder on my computer - take a look. It has pretty colours.

# KevinT said on Thursday, January 27, 2005 2:05 PM

Yeah, pretty. If you like fushia.

Go

Tags

  • .NET
  • Admin
  • ALT.NET
  • Community
  • Dotnet.org.za
  • eBooks
  • Fonts
  • Free Stuff
  • Fun Stuff
  • Google
  • Links
  • Microsoft
  • Personal OffTopic
  • Quotes
  • Red Five Labs
  • Robotics
  • Software Development
  • South Africa
  • SQL
  • Useful Advice
  • Utilities
  • Video
  • Virtual Post-It
  • Vista
  • VSTS Tips
  • WebDev
  • Wiki

Navigation

  • Home
  • Careers
  • Downloads
  • Support

Archives

  • May 2008 (1)
  • October 2007 (1)
  • July 2007 (1)
  • June 2007 (2)
  • May 2007 (1)
  • February 2007 (2)
  • January 2007 (2)
  • December 2006 (3)
  • November 2006 (9)
  • October 2006 (10)
  • September 2006 (3)
  • August 2006 (2)
  • July 2006 (6)
  • June 2006 (7)
  • May 2006 (9)
  • April 2006 (4)
  • March 2006 (14)
  • February 2006 (2)
  • January 2006 (5)
  • December 2005 (5)
  • November 2005 (7)
  • October 2005 (4)
  • September 2005 (10)
  • August 2005 (3)
  • July 2005 (5)
  • June 2005 (8)
  • May 2005 (11)
  • April 2005 (10)
  • March 2005 (7)
  • February 2005 (11)
  • January 2005 (12)
  • December 2004 (5)
  • November 2004 (2)
  • October 2004 (3)
  • September 2004 (10)
  • August 2004 (13)
  • July 2004 (6)
  • June 2004 (7)
  • May 2004 (24)
  • April 2004 (20)
  • March 2004 (21)
  • February 2004 (19)

Syndication

  • RSS
  • Atom
  • Comments RSS
Powered by Community Server (Commercial Edition), by Telligent Systems