Loading...
Area: Episerver Commerce
Applies to versions: 8 and higher

Migrating Commerce databases to Azure

Recommendations [hide]

This topic describes how to migrate an EPiServer Commerce Database (version 8.0 and higher) to Azure SQL Database. This scenario requires that you have a working EPiServer Commerce site with an Azure-compatible database. Refer to Deploying Commerce to Azure websites for more information. 

Using Microsoft SQL Server Management Studio 2012

Refer to How to: Use a DAC BACPAC to Migrate a Database to Azure SQL Database and the section "Migrating a DAC BACPAC File", for more information on how to work with SQL Server Management when exporting/importing databases.

Exporting, moving and importing

Exporting a BACPAC File From an Existing SQL Server Database

Moving the BACPAC File to the Azure Blob Service

Note that you must have a storage account to export a BACPAC to storage.

Note: If you get an error message when migrating, refer to the Migration note below for information on what to do.

Importing the BACPAC to Microsoft Azure SQL Database

If the bacpac import fails with a collation problem, you can change the collation of the bacpac file. You can do this by unzipping the file and change the collation in the model.xml file.

Using Microsoft SQL Server Management Studio 2008

Migration of a database in Microsoft SQL Server Management Studio 2008 is done in these steps:

  • Migrating of the database schema to the Azure SQL Database.
  • Transferring of data to the Azure SQL Database.

Using a DAC package to migrate a database schema to the Azure SQL Database

Refer to How to: Use a DAC package to migrate a database to Azure SQL Database for more information. Follow the steps below when migrating.

Extracting a DAC package from an SQL Server database

  • Open Microsoft SQL Server Management Studio.
  • Right-click on the database for which you want to extract a DAC package and select Task > Extract Data-tier Application... in the menu.
  • Follow the tools guide and make a note of your DAC package path for later usage.

Deploying the DAC package to an Azure SQL Database

  • Connect to your Azure SQL Database using Microsoft SQL Server Management Studio.
  • Right-click on your Azure Server and select Deploy Data-tier Application...
  • Follow the tools guide and use the DAC package you extracted in the previous step.

Note If you get an error message when migrating, refer to the Migration note below for information on what to do.

Transferring of data to the Azure SQL Database

You can use the SQL Database Migration Wizard from Codeplex to tranfer data to Azure, ensure to set Data Only in the Advanced Settings options.

Migration note

You may receive the following error messages while exporting the database to Azure SQL Database:

  • [table].[index_name]has an unsupported property FillFactor set and is not supported when used as part of a data package.
  • [table]does not have a clustered index. Clustered indexes are required for inserting data in this version of SQL Server.

Follow the steps below to correct the errors.

Fixing the "Unsupported property FillFactor" error

Correct this error by removing indexes that have a FillFactor property and re-create them without FillFactor.

  • Open your database in Microsoft SQL Server Management Studio.
  • Point to the index that had an error during migration, right-click the index and select Script Index as > DROP And CREATE To > New Query Editor Window.
  • In the generated script, remove the "FILLFACTOR" property, then execute the script to recreate the index.

Fixing the "Clustered indexes are required for inserting data" error

Correct this error by adding clustered index to tables that do not have any clustered index.

  • Open your database in Microsoft SQL Server Management Studio.
  • Point to the table that had an error during migration, right-click on Indexes and select New Index.
  • Add columns to the index, name this index and select Clustered as Index type.

Note that you might receive errors when dropping indexes if the table has Foreign Keys related to those indexes. To correct this, remove the Foreign Keys before dropping the indexes, and recreate them after recreating the indexes.

See also

Do you find this information helpful? Please log in to provide feedback.

Last updated: Oct 20, 2016

Recommendations [hide]