Search code examples
sql-serversql-server-2005installationsql-server-administration

Apply upgrades (application related) to database


Since I've not done this before I am not sure if the way I am planning to do this is okay or is there a better way. Like using Windows Installer or Install Shield or Windows Installer XML (WiX) toolset. Any help would be great, as I have no clue.

We have a product and we ship new version every few months. So far we've only been rolling out complete versions i.e. Either Version 1.0, or Version 1.5, but no upgrade from 1.0 to 1.2 to 1.3 to .... you get the picture, right! So any customer that get version 1.0 cannot upgrade to version 1.2 or 1.3 or even the latest. They'll have to uninstall old version and install the latest version. This is not right, but thats what we could do until now. But we'd like to change it.

My plan is to have a install file with (Sql Scripts) for each upgrade path. Check the table in database that stores the version info and depending on it run different script to upgrade database.

My concern is that this method may not be scalable, once we have more than 5 or 6 different versions.

If you could point to any articles or books on this topic, that would help a lot too.

Also, could we use Windows Installer or Install Shield for this?

thanks, _UB


Solution

  • Your problem is a pretty common one, and I've had to deal with this kind of problem at my last job. There is another tool aside from the RedGate tool that may help you do what you need to do. It's a tool called DB Ghost. They explicitly address the versioning problem, and have a packager as well. I would suggest doing a trial of the DB Ghost product because they have some interesting claims concerning multiple version upgrades. This was taken from their FAQ (http://www.innovartis.co.uk/faqs/faqs.aspx):

    Q: Our problem is going to be managing data structure changes during upgrades. Our product line is Shrink-Wrapped, or downloadable from the website. So when a user downloads an upgrade, they can be upgrading from a very recent version, with few database structure changes, or the upgrade may be from a very old version with a multitude of structural changes. One upgrade needs to manage it all. The user would be offsite, so we can't hold their hand. We have users in Greece, Australia, Malaysia, Norway, etc. How would DB Ghost, if at all, handle updates in remote locations?

    A: The DB Ghost Packager Plus product was design to specifically address this issue as it can dynamically handle the required updates to a target database seamlessly.

    I'm just mentioning this because our company is trying to do something similar and I was doing research on this tool.

    Thanks, Eric