Umbraco Commerce
CMSCloudHeartcoreDXP
10.latest (LTS)
10.latest (LTS)
  • Umbraco Commerce Documentation
  • Release Notes
  • Commerce Products
    • Commerce Packages
    • Commerce Payment Providers
    • Commerce Shipping Providers
  • Installation
    • Installing Umbraco Commerce
    • Licensing
  • Upgrading
    • Upgrading Umbraco Commerce
    • Version Specific Upgrade Notes
    • Migrate from Vendr to Umbraco Commerce
      • Migrate Umbraco Commerce Checkout
      • Migrate custom Payment Providers
  • Getting Started
    • Introduction
    • Umbraco Configuration
    • User Interface
  • How-To Guides
    • Overview
    • Configure SQLite support
    • Limit Order Line Quantity
    • Use an Alternative Database for Umbraco Commerce Tables
  • Key Concepts
    • Get to know the main features
    • Base Currency
    • Bulk Actions
    • Calculators
    • Dependency Injection
    • Discount Rules / Rewards
    • Events
    • Fluent API
    • Order Calculation State
    • Payment Forms
    • Payment Providers
    • Pipelines
    • Price/Amount Adjustments
    • Price Freezing
    • Product Adapters
    • Product Bundles
    • Product Variants
      • Complex Variants
    • Properties
    • ReadOnly and Writable Entities
    • Search Specifications
    • Settings Objects
    • Tax Sources
    • UI Config Files
    • Umbraco Properties
    • Unit of Work
    • Umbraco Commerce Builder
  • Tutorials
    • Overview
  • Reference
    • Go behind the scenes
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. How-To Guides

Use an Alternative Database for Umbraco Commerce Tables

How-To Guide to configure using an alternative database for the tables of Umbraco Commerce.

By default, Umbraco Commerce will use the same database as Umbraco to store its data. As e-commerce and content management have different database needs, it may be beneficial to house the Umbraco Commerce database tables in an alternative database.

To do this, you can configure a Umbraco Commerce-specific connection string in your app settings ConnectionStrings section using the umbracoCommerceDbDSN prefix.

{
    ...
    "ConnectionStrings": {
        "umbracoDbDSN": "Server=umbracoServerAddress;Database=myUmbracoDb;User Id=myUsername;Password=myPassword;",
        "umbracoDbDSN_ProviderName": "Microsoft.Data.SqlClient",
        "umbracoCommerceDbDSN": "Server=umbracoCommerceServerAddress;Database=myUmbracoCommerceDb;User Id=myUsername;Password=myPassword;",
        "umbracoCommerceDbDSN_ProviderName": "Microsoft.Data.SqlClient"
    },
    ...
}

When Umbraco Commerce runs, it will perform all of its migrations and operations against this database instead of the default Umbraco database.

PreviousLimit Order Line QuantityNextGet to know the main features

Last updated 1 year ago

Was this helpful?