Microsoft Sql Server Management studio 备份大小变为负数

发布于 2024-09-14 01:12:56 字数 738 浏览 1 评论 0原文

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

 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

玩套路吗 2024-09-21 01:12:56

备份过程的最后一步是从日志中追加数据,以反映备份过程中对数据库所做的任何更改,这可以解释您所看到的差异。

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.

晚风撩人 2024-09-21 01:12:56

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文