How does SQL Backup get the backup compressed size ?
minimarch
Posts: 4
Hello everyone,
I'm trying to develop a Web interface which will be used by my DBA. This interface will have to sum up different information (database size, database user...) whose the backup compressed size. I thought that this information was stocked in SQL Server's tables, but I had not find it.
Does SQL Backup get the backup compressed size directly from server's hard disk or get it from SQL Server ?
Thanks
Mini'
I'm trying to develop a Web interface which will be used by my DBA. This interface will have to sum up different information (database size, database user...) whose the backup compressed size. I thought that this information was stocked in SQL Server's tables, but I had not find it.
Does SQL Backup get the backup compressed size directly from server's hard disk or get it from SQL Server ?
Thanks
Mini'
Comments
It's stored in one of the bit fields of the backup history table in the MSDB database.I'll have to get more specifics later. When you select a database in SQL Backup and run SQL Profiler, the following query is sent, but this doesn't seem to accurately reflect the compression in my particular history. I have to find out why that is.
Red Gate SQL Backup (4.2.0.425): 00000000001F00000000000000029600000015CD000000010101
The first 16 characters after the ':' is the hex value for the uncompressed data size, while the following 16 characters is the hex value for the compressed data size. Thus, for the value above, the uncompressed data size is 2031616 bytes (00000000001F0000) and the compressed data size is 169472 bytes (0000000000029600).
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Compression Ratio,
Duration,
Size,
Compressed Size,
Compressed Speed
ect...
It looks like most of it is hard coded.
If you're using SQL Backup 5 or newer, another source of the information is in the SQL Server Compact database used by SQL Backup (see the last entry in this post for details). You'll need to query the backuphistory table e.g.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8