Questions tagged [multi-tenant]

A database architecture where multiple tenants share a single database or server. Also known as multi-client.

Filter by
Sorted by
Tagged with
0 votes
0 answers
42 views

Is Multi-tenancy already supported in Db2 v11.5?

I have found document https://www.wdug.com/resources/Documents/LUW%20Presentations/June%202021/Db2%20Tenant%20May%202021-Paul%20Bird.pdf and on page 25 there are instructions how to establish multi-...
  • 173
0 votes
1 answer
75 views

How do I provide access to certain rows that are common for all users when implementing PostgreSQL Row Level Security?

We have a multi-tenant database and this is a table in which we have implemented row-level security based on tenant_id: tenant_id product_id 0 A 0 B 1 1A 1 1B 2 2A 2 2B Our requirement is that ...
0 votes
0 answers
516 views

Handling multiple users/ databases in postgres

Whats the best way to organize seperate companies/users in postgres? I've developed a multi user platform, where users have access to only their companies data. I'm no DB engineer and initially the ...
0 votes
1 answer
251 views

Aggregate data with multi-schema tenant architecture

We have an application that uses the tenant schema architecture, one database, has multiple schema per "tenant", each tenant is a replica with same tables etc. Sometimes we don't know the ...
  • 101
0 votes
1 answer
332 views

ODA X8-2M crossrestore with TDE wallet fails with: DCS-10001:Internal error encountered: failed to open the tde password based wallet

We are trying to crossrestore a TDE encrypted Oracle Database 19.12 on a new ODA X8-2M. TDE wallet has been successfully backedup (odacli create-backup -in CDBET015 -c TDEWallet) and transferred to ...
  • 938
0 votes
0 answers
611 views

When cloning a PDB over dblink in Oracle 19c, is it possible to use file_name_convert without specifying entire paths?

Context Oracle version: 19.13 On server 1 I have a production database, with a CDB named (for the purpose of this question) CDBPROD and a PDB named PDBPROD. The datafiles are distributed in multiple ...
-1 votes
1 answer
142 views

Deadlock and locks on multitenant database

I work for a saas company that uses multi tenancy by a tenant_id, however we perform nightly jobs that dump mass amount of data from the last day of each tenant, sometimes we face deadlocks or simply ...
  • 1
0 votes
0 answers
104 views

Add extra column to anyelement type - querying across multiple schemas with extra information

I'm trying to create a generic function which can be used to query across all of my schemas. I'm using schemas to separate my tenants, so they all have the structure. I found Staab's post useful: ...
1 vote
1 answer
827 views

How can I Run stored procedures in public schema to provision and create tables in a new schema

I'm building a multi tenant application with shared database and different schemas(each customer has its isolated data in a schema) I have run a stored procedure that creates all tables and ...
0 votes
1 answer
220 views

Unable to create pluggable database on 19c using response file

I am trying to create a pluggable database using a response file, but it is giving me the error below, indicating that one of the mandatory parameters is missing. Although I have checked it multiple ...
  • 109
3 votes
2 answers
636 views

SQL Server - Automatically full backup for new databases which are auto-created with EntityFramework-Migrations

I have an ASP.NET MVC Application with a Multi-Tenant architecture (using SQL-Server). I'm using EntityFramework DB-Migrations which automatically generates a database per customer. In SQL-Server I ...
  • 33
1 vote
1 answer
746 views

PostgreSQL: Switching schema name in a loop

I am trying to switch the schema name dynamically to do some data manipulation. I am running the following. DO $$ DECLARE schema_name TEXT; BEGIN FOR schema_name in select "name" ...
0 votes
0 answers
202 views

Multi-Tenant Database Design - Tenant-specific Fields

I am working on an application modernization project. We run an application which keeps track of requests for medication for patients of multiple companies. One common design issue we run into keeping ...
0 votes
1 answer
187 views

Multi-tenant reduce number of MongoDB connections

Our multi-tenant app has about 4000 databases per tenant and we are having a problem with performance because of too many connections. Creating MongoDB connections on each database is a heavy ...
  • 101
2 votes
2 answers
522 views

Should I in general partition tables by tenant IDs in a multi-tenant system?

We're building a system where the data in 10 tables is associated with Accounts. A typical table looks like this: create table Things( accountId varchar(64) not null, internalId varchar(64) ...
2 votes
0 answers
187 views

Schema level encryption in Postgres

A multi-tenancy approach for many webapps is to use a separate PostgreSQL schema for each tenant. In addition to permissions and access controls, is it possible to encrypt a tenant's whole schema ...
  • 203
0 votes
1 answer
759 views

Most efficient table structure for multi-tenant database

I have a conventional relational database (mySQL) with several entities stored in their own table. Three examples are images, events and organisations. We are making a change to the way our site works ...
  • 103
2 votes
2 answers
2k views

Designing a multi-tenant database for a scenario with multiple user types

I'm developing a SaaS application for recruiting which has multiple user types such as Client, Recruiter, Panellist and Owner etc. There is also a chance that the user types may increase. The Owner ...
0 votes
1 answer
52 views

With Postgresql v10 and WAL2JSON... Is it possible to include the database name / datname in the json?

We have a set of databases that were not set up in a multi-tenant fashion. Looking to build a hub that will hold the data in a multi-tenant fashion using wal2json to pipe data from source to the hub. ...
1 vote
1 answer
328 views

Circular reference and multi-tenancy

I'm have an issue with circular reference in my DB design. As see the ER diagram below have 2 circular reference that I highlighted with Red and Orange arrow. Anyone know how to resolve this issue?
  • 11
0 votes
1 answer
82 views

Query that marries data between two databases

Database 1 is the master database where data on all domains in our client's industry are stored Database 2 (or Database N) are the application specific databases of our client. (e.g. Application ABC ...
1 vote
0 answers
40 views

Tool to help breaking multitenant into a single tenant [closed]

Oracle 11.2.0.4 I've been tasked with breaking out a single customer from our multitenant system into a separate system. And the data will have to be continuously updated. This is a large system ...
  • 1,549
0 votes
0 answers
267 views

Single-tenant to multi-tenant: restore old database to schema in new database

I have a Django app which uses Postgres as a database w/ the django-tenants package providing multitenant functionality. This is a migration from what was originally a single tenant database with just ...
0 votes
1 answer
161 views

Postgres Search Path between connections

I'm a noob to Postgres, and am setting up a multi-tenant database using one schema per tenant. To target each tenant I need to set search_path accordingly. I'm worried about accidentally executing ...
1 vote
0 answers
27 views

Are there any downfalls to not using foreign key relationships in a multi-tenary scheme?

We have a proposed restructure of our CRM containing almost 500 databases containing ~25 tables each into a single multidimensional database with one giant fact table linking everything together. I ...
  • 180
1 vote
1 answer
842 views

GDPR compliant multitenant MYSQL DB

I wonder what are the GDPR constraint on a MySQL DB for a multitenant SaaS application. While a solution with a single DB per each multitenant customer and restricted access will probably be fine, ...
  • 398
1 vote
1 answer
974 views

PostgreSQL: How to restrict resources per DB, Schema or User

Is there a way to configure PostgreSQL server instance to limit resources, e.g. work_mem or max_parallel_workers, by databases or schema? (or even limit a specific user) To my knowledge, parameters ...
0 votes
2 answers
86 views

In Oracle multi-tenant architecture, is a PDB a container?

Below is an excerpt from Oracle document. I just want to confirm, is it correct to consider a user-created PDB or a seed PDB as a container? It's a little weird to me. If this is true. Then ...
0 votes
1 answer
106 views

Understanding of Oracle multi-tenant PDBs

I'm a new user to Oracle. The document states The CDB root, also called simply the root, is a collection of schemas, schema objects, and nonschema objects to which all PDBs belong. and A PDB is ...
0 votes
1 answer
48 views

100+ DBs in one instance or divide and conquer : MariaDb Ubuntu 64bits

I have a desktop app (100+ customers and more to come) running at customer's small local server, all of them have same structure in tables (different info). I'm migrating that app to web ( almost ...
2 votes
3 answers
3k views

Multiple instance in one server

Could you please help to explain why one might need multiple instances of SQL Server on the same server? What is a good point to use separate instances? Why wouldn't one use two databases in one ...
2 votes
2 answers
228 views

What is better - having 10 databases for 10 organisations or 1 table for 10 organisation with org_id? [duplicate]

I am making a web service (using Laravel in case that is relevant) that will have many separate organisations generated by the service. Considerations I can manage all organisation data in one ...
  • 123
3 votes
1 answer
1k views

How to Prevent heavy queries on one database, affecting the performance of other databases on same server?

I have a linux server running just Postgres with PostGIS Extension. There are several databases on this instance of the Postrges Server. One of the databases has some computationally intensive ...
0 votes
1 answer
131 views

Reference a schema from public table column

I have a multi-tenant Postgresql database with each schema belonging one of our customers (tenants). Each tenant has a table called Messages. So CustomerX.Messages contains all of the messages that ...
0 votes
1 answer
386 views

Isolating access to tenant data in a multi-tenant database

We have a single SQL Server database for all tenants of a web-application. How can we ensure when a support engineer queries the DB directly via SSMS, they only touch data belonging to one tenant? ...
  • 205
1 vote
0 answers
98 views

Multi tenant .NET Core application

We are designing a new multi tenant .NET Core 2.1 application progra, where we are using one database per tenant. We can give each tenant a different subdomain so that we can base the tenant lookup ...
  • 111
3 votes
1 answer
2k views

How to do per-tenant backups for multi-tenant databases?

Are there any best practices, experiences or guidelines when it comes to do per-tenant backups/restores in a microservice multi-tenant application? In my case I have multiple Postgres servers which ...
  • 33
1 vote
1 answer
229 views

Is it good practice to have relationship between the tenant table and all other tables in a multi tenant application?

I am developing a multi tenant SaaS that uses Azure SQL for data storage. I make use of sp_set_session_context to make sure that any query only touches records relevant to the current tenant. I ...
2 votes
1 answer
2k views

What are the downsides of using PARTITION for multi-tenant access?

We have an RDS Postgres database which keeps individual store data in a common schema with a field called store_id to distinguish between stores. Let's say we have 1MB per store and 10k stores so we'...
  • 121
1 vote
1 answer
192 views

MongoDB as a log storage. Choosing shard key

I'm designing a log storage system based on MongoDB. I want to shard a log collection to increase ingestion and capacity (distribute writes to several machines) while allow fast search. I should be ...
1 vote
1 answer
137 views

How to build the database for subdomain multisite? [closed]

I'm building a kind of "multi site application" based on wildcard subdomain. And every site will of course have the same files but also the same database structure. But it's not necessary for each and ...
0 votes
1 answer
51 views

Any DBMS with table structures and data defined separately?

I'm working on an application which is being used in multi-tenant mode, and have created a MySQL database instance, where each tenant has its own schema. The problem I'm facing is, because the ...
  • 101
0 votes
2 answers
399 views

Multiple databases or tables with prefix?

I was creating an Accounting ERP for a multibrach company.Normally i would keep different databases for different branches, Can anyone tell me which is the standard way? 1) create databases respective ...
0 votes
0 answers
67 views

Multi Tenancy Report Solution

I have a separate database per a client although data structure is same for all databases. Only difference is all clients have their own data on their on databases. Now problem is when I need a report ...
2 votes
2 answers
4k views

Multi-schema, multi-tenant databases - data isolation through composite primary keys

We are designing a multi-schema, multi-tenant database for SQL Server 2016 that will service a basic CRUD application which will see small to medium transactional throughput and comprise of 15-20 ...
  • 1,544
2 votes
1 answer
638 views

How can I be specific about which CDB I want to connect to wrapping a PDB?

I'm quite new to Oracle. I created a CDB like cdb1 and then a PDB within like pdb1. Now I can connect to my PDB using something like: sqlplus user/password@server:port/pdb1 But can't I have two PDBs ...
  • 141
0 votes
1 answer
829 views

CREATE PLUGGABLE DATABASE REFRESH MODE MANUAL from remote fails with ORA-00922

I'm doing some test with remote PDB cloning. Both local and remote instance are Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production PL/SQL Release 12.1.0.2.0 - Production "...
  • 337
1 vote
2 answers
265 views

MySQL - Design + Optimization Question [closed]

I feel like I may of made a mistake with my database design. At the moment I have 73182 tables, 4 days ago I had 72236, and just 2 months ago we only had about 20k tables - so our growth spiked. ...
  • 133
0 votes
1 answer
424 views

SQL Azure large multi-tenant table / lock escalation issue / partitioning / full text index

Our app organizes its data in "projects" that are saved in an SQL Azure database. A project can contain 100s or 100'000s of rows (spread over 35 tables). Since we have 1000s of projects, using a ...
  • 1
1 vote
1 answer
957 views

Multi-Tenant shared Users Tables: Need an advice

Am writing multiple Multi-Tenant applications with separate database per each application (I've decided to go with shared database different schema approach). Each application have Staffs Table for ...