GA4

Thursday, December 16, 2010

Migration of Catalogs from Commerce Server 2000 to Commerce Server 2009

There are lots of ways to migrate data from one version to another. But sometimes, the situation does not always permits you to do the migration with the defined migration path of a specific product. To achive these types of migration you need to build some custom solutions or tools. I landed up with a same situation when I need to migrate Catalogs from Commerce Server 2000 to Commerce Server 2009. Initaily I tried to find out some tools across the web or any Microsoft tool but was unsuccessfull. I found the migration path of commerce server catalogs from Commerce Server 2002 to CS 2007 and so on, but not from CS 2000 to CS 2007/2009 and nither from CS 2000 to CS 2002. Than I thought of creating my own tool to do the migration. There were initially lots of thought process has gone before I come up with the tool. Finally, I come up with the design and the implementation. Briefly I'll be telling what can be done for the migration and how you can achived it.
Following is the migration path which I have thought of:

1. Generate the catalogs of Commerce Server 2000 into the XMLs.
SqlCommand cmd = new SqlCommand("SELECT * from .dbo.[CatalogGlobal] order by CatalogName", conn); //This will help you to get the catalogs avalaible in the CS database
SQLDataReader dr = cmd.ExecuteReader();

Iterate the dr and use the following command to create the Commerce Server 2000 XMLs which contains the catalog.

a. Create an instance of a CatalogManager

b. catalogManager.ExportXML(strDestinationFolder + strFileName, (object)dr["CatalogName"].ToString().Trim(), true);
2. Once the abve XMLs are created, migrate the generated XML to Commerce Server 2009 Catalogs Schema.
a. Use the component CatalogCS2000XmlImport.dll to migrate the CS 2000 XMLs to Cs 2009 Catalog database. This dll is present when you install CS 2007 or CS 2009. Serach it those directories.
I got it from "c:\Program Files\Microsoft Commerce Server 2007"
catalogCS2000XmlImport.ImportXML("CS 2009 Catalog Database", "CS 2000 generated XML file path along with a file", false, false);

After the above step is done, you are done with your migration.

You can check the migrated catalogs through Catalog Manager which is a part of CS 2009 Partner SDK. This will aslo help you in checking whether you catalogs has been migrated properly or not. I have been using the Catalog Mager as my verification tool for my migrations.
3. Export the migrated catalog to CS 2009 into XML and compare it to the older CS 2000 Catalog XML. This will help you to understand the schemas and help you further in you migration.

I hope you enjoyed reading this blog.

No comments: