Question

Our software is over 20 years old, and dates way back to databases such as Sybase and SQL 7. Now let's ignore the Sybase part. We have many old customers using very old versions of our software, varying between SQL 7 (2001-2002) to SQL 2014 (We support today). Technically speaking, our software can still actually run on MSDE 2000. But that's besides the point. We enforce all updated clients to use at least SQL Server 2008 R2, but officially support up to 2014. And yes, we do have many old customers still using ancient versions of our software on Windows '95.

Anyway, down to the question. Currently, whenever we have one of these old customers return and wish to upgrade, we have to go through a big elaborate upgrade process. Now the scripts are the easy part. I am actually just finalizing the latest major upgrade script, which supports upgrading databases from our 2001 (SQL 7) version to our latest version. The very same script accommodates for any in-between version.

However, before I can run these scripts, I first have to take the database through a series of manual and tedious steps. I have it sped up to this process:

  1. Acquire database over internet from customer
  2. Restore SQL 7 database directly into MSDE 2000 (on a dedicated XP machine)
  3. Raise database compatibility to MSDE 2000
  4. Backup database to a new file
  5. Restore MSDE 2000 database directly into SQL Server 2008 R2
  6. Raise database compatibility to SQL Server 2008
  7. Backup database to a new file
  8. Restore SQL 2008 R2 database directly into SQL Server 2014
  9. Raise database compatibility to SQL Server 2014
  10. Run all scripts on database for software changes over time
  11. Backup database to a new file
  12. After installing software for customer, restore database over internet

So as you can imagine, a lot of returning customers would be a full-time job. I suppose I could build some sort of automation on this XP machine, but this is still a manual process I'm looking to eliminate. We don't want to even need to acquire their database, and many of them don't want us to see their data.

Is there a method which I can easily distribute onto our client's machine, as part of the installer, which can automatically perform the upgrade from any given database version from SQL 7 to SQL Server 2014?


EDIT

To be a bit more clear on the installation process, this is an installer we already have capable of restoring databases directly from 2000 to 2008 R2. But we need to expand this installer to accommodate for upgrading databases ranging from MSSQL 7 to 2014. As I now understand, I can jump straight from 7 > 2005 > 2014. But that's still a hop I would like to eliminate, if possible. I would hate for our installer to load both 2005 and 2014 on our clients' machines.

Was it helpful?

Solution

If I was in your place, I would go the below route which is not as tedious as you would think of.

  • Backup your sql 7.0 database and restore it on sql server 2005.
  • Backup your sql server 2005 database and restore on sql server 2014.

Its a myth that you cannot upgrade a database to a version more that is more then two versions newer.

I have written an elaborated answer about the pre and post migration steps that will be a handy reference to you.

For automation, you can use dbatools (powershell based) - start-sqlmigration that supports migration from sql server 2000 to 2016 (newest version out).

Note: You have to test out a lot of stuff as this is a major leap for your application !

OTHER TIPS

That makes your life easier, negating the triple hop from 7-2000-2008-2014.

Still not a great solution however. I would invest the time in writing a PowerShell script to automate this process.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top