Skip to content
Advertisement

Multi-tenant database : create .BAK file for single tenat

In my application I use multi tenant design in my SQL Server database.

My question is: what if one of my customer comes and say, I want my own data as a backup file, how can I create backup file for just that tenant?

Is there is any way to do that?

Do I need any 3rd party tool? Can I do this in a .NET console application?

Advertisement

Answer

how can I create backup file for just that tenant?

There is no way to do this without running an ETL job either to extract the tenant’s data, or to remove the other tenants’ data from a restored copy of the database.

This is one of the (many) reasons why you should favor using a database-per-tenant architecture.

Advertisement