Orders DataMigration From CS2002/2000 to CS2007
OrderSystem in CS2007 comprises of 2 site resources as it did in CS2002/2000. Orders migration is not an in place migration. Migration tool loads data from CS2002 tables, transforms it to CS2007 format and inserts it into CS2007 tables. Tool creates the CS2007 orders system schema in the same database as CS2002. Since all table names are unique it does not over write any out of the box CS2002/2000 tables (However if you’ve extended your CS2002/2000 database schema then it’s recommended to verify that there are no conflicting table names before running the migration tool, otherwise data from the tables with conflicting names will get deleted. For this you can open the Requisition.sql and TaxAndShipping.sql files installed with CS2007 installation under SDK/SiteCreate folder.). Following tables participate in migration process. Since OrderSystem migration is CPU intensive, it’s recommended to run the tool from a different machine than the Sql box so that SqlServer and the migration tool are not competing for the resources.
|
OrderSystem Site Resources |
CS2002/CS2000 |
CS2007 |
|
Transactions |
OrderGroups
OrderGroupAddresses
OrderFormHeader
LineItems |
PurchaseOrders
OrderAddresses
OrderForms
LineItems
|
|
TransactionConfig |
ShippingConfig
tableShippingRates
Region |
ShippingMethod
ShippingRates
RegionCodes |
Here I'm going to illustrate the data migration for the Runtime data present in the transaction database (i.e. Purchase Orders\Baskets\ Order Templates). Migration tool loads the CS2002 data in dictionary format using dbstorage. Data from the dictionary is converted to strongly typed objects using the Pipeline adapter. Once the objects are created they are persisted using the Save methods implemented by these objects. Pipeline adapter makes use of the mapping file specially customized for the migration purposes only (OrdersMigrationMappings.xml). Mapped storage system uses the default OrderObjectMappings file. Before the migration the tool verifies the data in CS2002 database and reports if data from a column will land in the blob column after the migration. You should carefully analyze these messages and if you don’t want data from a column to move into the blob column you’ll need to perform extensions to the order system. OrderMigrationMappings.xml file contains the mapping between the dictionary key and the properties in CS2007 object model and the orderobjectmappings.xml files contains the mapping for properties with the Sql table columns. These mapping are used to determine whether data from a strongly typed column in CS2002 database table will land in blob column in CS2007 table.
Since there can be large set of orders and baskets in your database, migration tool implements fault tolerant logic so that you’ll not need to restart the migration process if there are bad records in the database. If there are certain records which cannot be migrated successfully it keeps logging the OrderGroupId for such records in an ExceptionLog this log is different from the detailed error log used by the migration tool. After migration tool completes the migration you can go and fix such records and re-run the migration tool in the exception mode. In this case it will only migrate the records which are logged in the exception log. There is a threashold (10000 records) after which migration tool will error out and you’ll need to re-run it in the normal mode.
Migration for TransactionConfig data is straight forward. Data is loaded from the CS2002 tables and is inserted into CS2007 data tables. ShippingConfig table in CS2000 database did not contain the language column so the migration tool populates ‘Unknown’ value for this column in ShippingMethod table in CS2007 database. In CS2002 same shipping method in different languages was considered as different shipping method. This problem has been fixed in CS2007. But the migration tool cannot group the shipping methods from different languages so you’ll need to make use of the Customer and Order manager UI to group the same shipping methods in different language. CS2007 database schema has enforced few unique constraints in ShippingMethod and RegionCodes tables. These constraints were not present in the corresponding tables in CS2002/2000 database. Migration tool will report about the data which violates these constraints before migrating the data. If you see any such errors you’ll need to fix such rows manually and then run the migration tool.
Comment Notification
If you would like to receive an email when updates are made to this post, please register here
Subscribe to this post's comments using