Microsoft SQL Server Managment Studio备份大小为负 [英] Microsoft Sql Server Managment studio backup size goes negative

查看:56
本文介绍了Microsoft SQL Server Managment Studio备份大小为负的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是我需要解释工厂中数据库备份的不同大小.有时,即使没有数据从系统中删除,大小之间的差异也为负.

The problem is that I need to explain the different sizes of backups that are being made of a database in a plant. Sometimes the difference between the sizes is in negative, even though that there is no data being deleted from the system.


 Datum  Backupfile-file         Size KB     Diff    

 6/1/10 backup201006010100.bak  3355914          

 7/1/10 backup201007010100.bak  4333367     977453  
 7/2/10 backup201007020100.bak  4355963     22596   
 7/3/10 backup201007030100.bak  4380896     24933   
 7/4/10 backup201007040100.bak  4380404     -492    

 8/1/10 backup201008010100.bak  4507775     1151861 
 8/2/10 backup201008020100.bak  4507777     2   
 8/3/10 backup201008030100.bak  4532492     24715   
 8/4/10 backup201008040100.bak  4584028     51536   

在7/3/10和8/1/10时没有生产.在其他日子里,生产基本上是一致的,因此数据库的大小有望线性增加,但是大小变为负数又是怎么回事.

On 7/3/10 and 8/1/10 there was no production. On other days the production is mostly consistent hence the database is expected to have a pretty much linear increase in size, but how is it that the size goes to negative.

在维护计划中,任务是:备份数据库任务(类型:完全附加现有)->收缩数据库(保留10%的可用空间)

In the maintenance plan the the tasks are: Backup Database Task (Type: Full Append Existing) -> Shrink Database (Leave 10% free space)

推荐答案

SQL Server具有两步存储数据的过程.首先,您的数据进入日志文件,不仅是您插入的数据,还包括SQL对数据执行的操作的整个列表.因此,如果发生错误,SQL可以重播"您的事务.

SQL Server have 2 step process of storing your data. First, your data goes into log file, and it not only data that you inserted, but also the whole list of operations SQL performed on your data. So, if something wrong happens, SQL can 'replay' your transactions.

在某个时候发生CHECKPOINT,ans数据被写入数据文件.日志文件有增长和收缩的趋势.

At some point CHECKPOINT happens, ans data gets written into data file. Log files have a tendency to grow and shrink.

在BACKUP期间,SQL将准确地看待BACKUP时写入数据和日志文件.这就是为什么您可以看到大小上的差异.

During BACKUP, SQL will write data and log files EXACTLY as they look at the point of BACKUP. That's why you can see that difference in size.

这篇关于Microsoft SQL Server Managment Studio备份大小为负的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆