有没有办法只完整备份 SQL 2005 数据库结构,但只备份特定模式集中的数据?
我的数据库中有几个模式,最大的一个(“大”意味着消耗的磁盘空间)是我的“web”模式,它是操作模式中数据的非规范化副本。
这种非规范化的数据可以随时重建,并且仅用于极快的读取目的。由于数据是冗余的,而且非常大 - 我想将其排除在备份之外。我已经有了可以在几个小时内重新生成该架构中的所有数据的存储过程 - 以便在发生故障时使用。
我假设我可以将此模式中的表拆分到另一个数据文件等(理想情况下甚至在另一个驱动器上以加快读取速度),但是有没有办法永远不备份该数据文件,但在发生故障时仍然可以结构可以恢复(以及其他 DDL 内容,如过程、视图等)?
有点相关的是,如果我对数据库的其余部分进入“完整”备份模式,我是否也可以让这些表不进行事务日志记录?
I have several schemas in my database, and the largest one ("large" meaning disk space consumed) is my "web" schema which is a denormalized copy of data in the operational schemas.
This denormalized data is able to be reconstructed at anytime, and is merely there for extremely fast read purposes. Since the data is redundant, and VERY large - I'd like to exclude it from being backed up. I already have stored procedures that can regenerate all of the data in that schema in a couple of hours - for use in the event of a failure.
I assume I can split the tables in this schema out to another data file or such (ideally even on another drive for faster reads), but is there a way to never have that data file backup, yet still in the event of a failure its structure could be restored (and other DDL stuff like procs, views, etc)?
Somewhat related, can I also have these tables not do transaction logging, if I go to "Full" backup mode for the rest of the database?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看一下将“大”架构实体移动到只读文件组中(请参阅 http://msdn.microsoft.com/en-us/library/ms190257.aspx)。这也将避免该数据的锁定/事务开销。
然后,您可以使用部分备份来仅备份主文件组和您选择的任何可选文件组(请参阅 http://msdn.microsoft.com/en-us/library/ms191539.aspx)。
Take a look at moving your "large" schema entities into a read-only filegroup (see http://msdn.microsoft.com/en-us/library/ms190257.aspx). This will also avoid the locking/transaction overhead on this data.
You can then use partial backup to only backup the primary filegroup and any optional file groups of your choice (see http://msdn.microsoft.com/en-us/library/ms191539.aspx).
为了支持您想要的所有功能,您必须将非规范化数据移至单独的数据库中。
To support all the capabilities you desire you will have to move the denormalized data out into a separate database.