简体   繁体   English

多租户数据库:为单租户创建.BAK文件

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

In my application I use multi tenant design in my SQL Server database.在我的应用程序中,我在 SQL 服务器数据库中使用多租户设计。

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?我需要任何第 3 方工具吗? Can I do this in a .NET console application?我可以在 .NET 控制台应用程序中执行此操作吗?

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.如果不运行 ETL 作业来提取租户的数据或从数据库的还原副本中删除其他租户的数据,则无法执行此操作。

This is one of the (many) reasons why you should favor using a database-per-tenant architecture.这是您应该支持使用每个租户数据库架构的(许多)原因之一。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM