Sql-server – SQL Server: backup error 112: not enough space on the disk – true or not

backupsql server

Last night my weekly backup on SQL Server 2014, running on Windows Server 2012 R2, failed with the following error in the log:

failed with the following error: "A nonrecoverable I/O error occurred on file "D:\MSSQL\MSSQL12.MSSQLSERVER\Backup\backup-xxxx.bak:" 112(There is not enough space on the disk.).

When I checked disk space I found there was still 1 GB free, and the .bak file looked ok, all 4GB of it, not compressed.

So I ran a RESTORE VERIFYONLY command on that file:

RESTORE VERIFYONLY FROM DISK = 'D:\MSSQL\MSSQL12.MSSQLSERVER\Backup\backup_xxxx.bak'

that responded:

The backup set on file 1 is valid.

So which version of the story should I trust?

Note: According to Pinal Dave (http://blog.sqlauthority.com/2016/04/14/sql-server-backup-randomly-failing-error-112-not-enough-space-disk/) the first error is not accurate, especially if using compressed backups.

Best Answer

Ok, my bad. :-/ SQL Server is correct on both accounts.

The weekly full backup starts at 6 PM on Sundays, and the daily incremental backup starts at 8 PM. The weekly backup is still running when the daily incremental starts. The daily incremental records a .bak file that is the same size as the full, because ?? all indexes, statistics and so on have changed.

At this point, or rather, some two hours later, when it has finished reorganizing indexes and updating statistics, there isn't enough disk left for the full backup.

The incremental backup that I checked with RESTORE VERIFYONLY is ok. The full backup was never created.

So now I have to choose between some options:

  • start the Full backup a few hours earlier,
  • skip the incremental on Sundays,
  • (suggestions welcome ... )