Today I noticed that the backup of the log of our database was 18GB but the size of the log file is only 8GB.
I used the following command to backup:
BACKUP LOG [myDB]
TO DISK = N'g:\sqlbackup\LOG\myDB_LOG_20160329_084501.trn'
WITH CHECKSUM
, COMPRESSION;
Can anyone explain how it's possible that the backupfile is larger than the logfile?
Update:
The database is in full recovery mode and here are 216 VLF's in my log file.
I just looked to the size of the ldf file to determine the size of the log (I know this is not the right way but you would expect if the backup is 18GB the ldf file would be greater than 8GB).
I asked my colleague and he shrunk the log file manually before backup, the size changed from 10GB to 8GB (only 2% of the logfile was being used).
Why would a shrink (after or before backup) of the log file cause this?
Also there is only one backup in my backup file.
USE [DbName]; DBCC LOGINFO
... you'll get one row per VLF.