This content is archived. See latest version here

Last updated: Mar 31 2014

Introduction

This document describes how to partition catalog database objects into their own database in EPiServer Commerce. This is done to allow easy backup and rollback of the databases, as part of the integration processes for EPiServer Commerce.

Setting up the partitioning

To set up the partioning you need to change the database connection strings and create the catalog tables.

1. In the ecf.catalog.config file, change the connection string to a new connection string which points to the database with the catalog tables.

XML
<?xml version="1.0"?>
<Catalog autoConfigure="true">
  <Connection connectionStringName="EcfSqlConnection" />
  <Cache enabled="true" collectionTimeout="0:1:0" entryTimeout="0:1:0" nodeTimeout="0:1:0" schemaTimeout="0:2:0" />
  <Encoding imageQualityPercentage="80" defaultFormat="jPeg" />
  <Roles />
  <Events>
    <add type="Mediachase.Commerce.Catalog.Loggers.CatalogLogger, Mediachase.Commerce" />
  </Events>
  <!-- Sale Price Types -->
  <SalePriceTypes>
    <add key="AllCustomers" value="0" description="All Customers" />
    <add key="Customer" value="1" description="Customer" />
    <add key="CustomerPriceGroup" value="2" description="Customer Price Group" controlUrl="~/Apps/Catalog/Modules/CustomerGroups.ascx" />
    <!-- Add custom types here -->
    <!--
    <add key="JurisdictionGroup" value="3" description="Jurisdiction Group"/>
    -->
  </SalePriceTypes>
</Catalog>

2. To create the tables you need to run the following scripts which can be found in this path location:
C:\Program Files (x86)\EPiServer\CMS\7.5.394.2\Install\Modules\EPiServer Commerce 7.5.394.2\ECF\Data\SqlScripts

Print 'Installing Catalog Schema'
Print 'Running ecf_db_CatalogSystem_schema.sql'
:r ..\ecf_db_CatalogSystem_schema.sql
Print 'Running ecf_db_CatalogSystem_storedprocedures.sql'
:r ..\ecf_db_CatalogSystem_storedprocedures.sql
Print 'Running ecf_db_CatalogSystem_DataLoad.sql'
:r ..\ecf_db_CatalogSystem_DataLoad.sql
Print 'Running ecf_db_CatalogSystem_diagram.sql'
:r ..\ecf_db_CatalogSystem_diagram.sql Print 'Done'


Do you have feedback on this documentation? Send an email to documentation@episerver.com. For development-related questions and discussions, refer to our Forums on https://world.episerver.com/forum/