size on 'backupset' is different!!!

  • HI,

    when I run

    select s.database_name, s.name, s.backup_start_date, s.backup_size, s.type from backupset s join backupmediafamily f on

    s.media_set_id = f.media_set_id

    where s.database_name = 'AdventureWorks' and type = 'L' order by backup_start_date desc

    I get backup_size in the result = 367616 ( it's in bytes, according to BOL)

    But in the window .trn file it shows = 388 KB

    I think 1 KB = 1000 bytes So, when I do 367616/1000 = 367.616 KB which is different than 388KB!!!!!

  • It's actually 1024, not 1000. That equates to 359kb. Probably what's not included is header information and meta-data about the backup itself. That would explain the extra 19kb.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Grant, that's what I thought. I just googled it says 1 Kilobyte = 1000 byte. Backup_set is in bytes according to BOL. I am trying to figure out backups size everyday to adjust a drive but numbers don't match!!!

  • Clearly clarity and computer science don't always go hand in hand.

    I'm pretty sure using the query should get you ballpark close. It won't be perfect. I'm pretty sure the value stored is the data moved into backup, not including header information. But the header info is going to be only a little off... Oh, and that data moved probably doesn't include rolled forward or rolled back transactions.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Thank you very much!!!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply