Monday, November 23, 2015

Syncing uCommerce data between Sitecore environments using Visual Studio

Because uCommerce data is actually stored directly in the database, syncing that shop data (products and even orders) is not as simple as using a Sitecore package or Team Development for Sitecore. The best method is to sync the actual database tables, of which there a number of tools available both paid and free.

I have found success using SQL Server Data Tools in Visual Studio. A download is available online, however there may be licensing considerations based on which version of visual studio you are using.
Once installed, the following steps can be followed to sync data from one uCommerce environment to another.

  1. In visual studio, open the SQL Server Object Explorer (from the View menu)
  2. Add the connection details for both SQL environments. You will simply need the server name and authentication details.
  3. Right click the web database (Sitecore) of the source Sitecore installation and select Data Comparison


  4. Now select the target database (which is the Sitecore Web database, where you want the data to be synced to).


  5. Now you will select the data which is to be compared, if you are looking to sync everything, simply select everything that begins with [dbo].[uCommerce*]


  6. Click finish and the comparison will be made. The summary shows all of the differences between the source and target and clicking Update Target will move all uCommerce data over.

  7.  
Please note: this method works well when populating from a production environment to test/dev for development purposes. When syncing between actual live environment, or where a merge happens, care should be taken is terms of what data is removed or even deleted.

No comments:

Post a Comment