Microsoft Sql Server Management studio 备份大小变为负数
问题是我需要解释工厂中数据库的不同大小的备份。有时,即使没有从系统中删除数据,大小之间的差异也是负数。
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
2010年7月3日和2010年8月1日没有生产。在其他日子里,生产基本上是一致的,因此数据库的大小预计会呈线性增长,但大小怎么会变成负值。
在维护计划中,任务是: 备份数据库任务(类型:完全追加现有)->收缩数据库(保留 10% 可用空间)
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
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.
In the maintenance plan the the tasks are: Backup Database Task (Type: Full Append Existing) -> Shrink Database (Leave 10% free space)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
备份过程的最后一步是从日志中追加数据,以反映备份过程中对数据库所做的任何更改,这可以解释您所看到的差异。
The last step of the backup process is to append data from the log that reflects any changes made to the database during the backup process, this could account for the difference you are seeing.
SQL Server 存储数据的过程分为两步。首先,您的数据进入日志文件,它不仅包括您插入的数据,还包括 SQL 对您的数据执行的整个操作列表。因此,如果发生错误,SQL 可以“重播”您的事务。
在某个时刻发生 CHECKPOINT,数据被写入数据文件。日志文件有增大和缩小的趋势。
在备份期间,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.
At some point CHECKPOINT happens, ans data gets written into data file. Log files have a tendency to grow and shrink.
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.