数据归档[设计]
我正在为使用 Dotnet 和 SQL Server 作为后端的应用程序开发归档模块。通过多种归档方法,我们决定构建一个自定义应用程序,将整个数据库归档到另一个镜像数据库(达到选定的阈值),然后从源数据库中删除已归档的项目。这必须从自定义应用程序完成,而不是从链接服务器、作业、SSIS、复制或任何其他东西完成。
有一些项目将在每次归档运行时被清空并再次重写。在开始构建模块之前,我们正在考虑从镜像存档数据库中删除外键约束,以避免当我们清空这些表并重写时出现任何引用完整性冲突(只有约束将被删除,列和值仍然存在于存档中)数据库)。然而,这种方法对我来说并不可疑,但也有点令人不安。所以我在这里问处理这个问题的正确方法是什么?
I am developing an archive module for an application using Dotnet and SQL Server as back end. From multiple approaches of archiving we've decided to build a custom application to archive the complete database up-to a chosen threshold to another mirrored database and then removing the archived items from source DB. This has to be done from a custom application and not from a Linked Server, job, SSIS, Replication or any thing else.
There are some items which will be emptied and rewritten again on each archival run. Before starting to build the module we were thinking to remove the Foreign Key constraints from the mirrored archived database to avoid any referential integrity violation when we Emptied these tables and re-write (Only constraints will be removed, columns and values still exists in the archived DB). However this approach not even seems fishy to me but kinda disturbing as well. So here I am asking what will be the right approach to deal with this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们在问题中坚持这种设计。
We stick to this design in the question.