Open Closed

Steps to create Single Deployment - Multiple Database Multi Tenant Solution #335


User avatar
0
hraval created

Hi,

I am looking for steps to create "Single Deployment - Multiple Database" Multi Tenant Solution. That means master (host) database will have only tenant metadata info only and rest of the tables will be created in separate DB per tenant.

I downloaded the new abp startup template(V3.0.5). Added separate connection string for "AbpTenantManagement" in Acme.BookStore.DbMigrator project. However it is throwing error when running Acme.BookStore.DbMigrator project to create new DB.

{
  "ConnectionStrings": {
    "Default": "Server=AIL074\\SQLEXPRESS17;Database=BookStore;Trusted_Connection=True;MultipleActiveResultSets=true",
    "AbpTenantManagement": "Server=AIL074\\SQLEXPRESS17;Database=BookStoreTenantDB;Trusted_Connection=True;MultipleActiveResultSets=true",
  },
  "IdentityServer": {
    "Clients": {
      "BookStore_Web": {
        "ClientId": "BookStore_Web",
        "ClientSecret": "1q2w3e*",
        "RootUrl": "https://localhost:44354"
      },
      "BookStore_App": {
        "ClientId": "BookStore_App",
        "ClientSecret": "1q2w3e*"
      }
    }
  }
}

ABP Framework version: v3.0.5 UI type: Angular

Please provide guidance on this to implement multi-tenancy with Single Deployment - Multiple Database approach.

Thanks.


2 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Please refer the document :https://docs.abp.io/en/abp/latest/Entity-Framework-Core-Migrations#using-multiple-databases. It can help you

  • User Avatar
    0
    alper created
    Support Team Director

    closed due to inactivity...

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 20, 2025, 18:00