Sql-server – Migrating database from SQL Server 2005 Enterprise to SQL Server 2008 Standard

migrationpartitioningsql serversql-server-2005sql-server-2008

I'm attempting to migrate a database from SQL Server 2005 Enterprise to SQL Server 2008 Standard. I've run into an issue because there is a partition function defined in the database of the Enterprise edition. I know Standard editions do not support partition functions. Upgrading the version of SQL Server I'm migrating to Enterprise isn't an option.

I'm looking for a way to remove the partition function without causing any negative effects to the database currently so I can migrate it to the 2008 Standard Edition.

Any help would be greatly appreciated. Thanks!

Best Answer

Well, if you're only concerned with how to get around this partitioning issue you have, and are sure you won't face performance issues after you move to a single partition, then you could try to collapse all of your partitions into 1, and there's lots of ways to do.

If you feel your system can handle it, you could dump all the data into another table and give it a max ID number to dump into. Then when the bulk of the data is copied into there, you could note the ID, find any new records that came in. If it's a huge amount of records, dump those new records in the new table as well. After the 2nd dump you should be almost caught up. At that point you do not allow new data to come in for a few seconds/minutes while you run pre-scripted out commands to:

-move the remaining data into the new table that doesn't have partitioning enabled after making sure the schemas match.

-rename the old table. Make sure you don't have blocking issues.

-rename the new table to the old table.

You might want to avoid adding indexes at the beginning, and do those at the very end.

If doing this on the live system isn't an option, you could move the data to another system and do all these steps there.

Perhaps you could use this opportunity to archive your old data. You could consider creating a view and have your old data in a different archive read only database and have it referenced with a view.

How much data is it anyways, with and without indexes?