none
VSTS数据库中清除某一时间点之前的操作记录 RRS feed

  • 问题

  • 您好:
         随着VSTS服务器使用的时间增加,每次备份的数据文件越来越大,目前已经达到10GB大小,越来越大的数据库给数据恢复带来较大的风险。据我所知,之所以导致数据库备份大小增长较为迅速的原因是:用户对数据操作记录越来越多。不知道是否可以对所有数据某一时刻的LOG进行清理?(比如:只保留最近三个月内的LOG记录)
    如果可以实现,还请指点实现该步骤的简要步骤及方法或者其他注意事项。谢谢!

    Kevin
    idno@live.com
    2009年6月10日 7:54

答案

  • 我觉得可能是楼主的备份策略有问题, transaction log 支持Truncation. 请参考http://msdn.microsoft.com/en-us/library/ms189085.aspx

    Except when delayed for some reason, log truncation occurs automatically as follows:

    • Under the simple recovery model, after a checkpoint.
    • Under the full recovery model or bulk-logged recovery model, after a log backup, if a checkpoint has occurred since the previous backup. For more information, see "Log truncation under the full and bulk-logged recovery models," later in this topic.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
    2009年6月22日 8:31