Tenant Setup for Multi-tenant Architectures

New in version 2.0.0: Global Report feature can be used to share system reports among all tenants, see Global Report Setup Guide.

In multi-tenant systems, tenant data is stored in similar database structures placed in

  • different databases - Separate Database Architecture
  • different schemas in the same database - Separate Schema Architecture
  • same tables, schemas and databases - Shared Schema Architecture

Separate Database Architecture

Each tenant data is stored in a separate database with identical structure.

../_images/TicketDesk_-_Separate_Database_Architecture.png

Fig. 130 Sample Separate Database Architecture

  1. Add connections to each tenant database at that tenant level.

    In this sample, create 4 tenants each having one connection to its database.

  2. Data model and other settings should be set up for one tenant, then copied to other tenants using a Copy Management setting similar to the following:

    ../_images/Copy_Management_-_Separate_Database_Architecture.png

    Fig. 131 Copy Management for Separate Database Architecture

Separate Schema Architecture

Each tenant data is stored in a separate schema in the same database.

  1. Add connections to the shared database at that each tenant level.

  2. Set up data model for one source tenant only.

    ../_images/MultiTenantCase2_T1_Data_Model.png

    Fig. 132 Connection and Data Model for one Source Tenant

  3. Skip data model for other tenants (Just add the connection, test then save it).

    ../_images/MultiTenantCase2_T2_Connection.png

    Fig. 133 Connection for other Destination Tenants

  4. Copy data model to other tenants using a Copy Management setting similar to the following:

    ../_images/Copy_Management_-_Separate_Schema_Architecture.png

    Fig. 134 Copy Management for Separate Schema Architecture

  5. The data model was successfully copied to other tenants.

    ../_images/MultiTenantCase2_T2_After_Copy.png

    Fig. 135 Copied Data Model

Shared Schema Architecture

Each tenant data is stored in the same tables, schema and database, identified by different values in a “TenantID” field in every table.

  1. Add connections to the shared database at that each tenant level.

  2. Set up data model for one source tenant only.

    ../_images/MultiTenantCase3_T1_Data_Model.png

    Fig. 136 Connection and Data Model for one Source Tenant

  3. Skip data model for other tenants (Just add the connection, test then save it).

    ../_images/MultiTenantCase3_T2_Connection.png

    Fig. 137 Connection for other Destination Tenants

  4. Copy data model to other tenants using a Copy Management setting similar to the following:

    ../_images/Copy_Management_-_Shared_Schema_Architecture.png

    Fig. 138 Copy Management for Shared Schema Architecture

  5. Specify this specific “TenantID” field in the “Tenant Field” advanced setting to automatically restrict report data to that of the tenant of the current logged-in user.

    (This setting basically adds a filter condition “TenantID” = <value of the tenant id of the current logged-in user> to every query sources used in report)

    Note

    Please note that the field must be wrapped in brackets when set. For example: TenantID should be set as [TenantID]

    ../_images/Tenant_Field_advanced_setting.png

    Fig. 139 Tenant Field Advanced Setting