One of the main characteristics of some type of data used in Smart Grid solution is that there are lots of them. SCADA and AMI are filling applications, which process data and put them in database, SQL Server.
In order to reduce the size of backup files, SQL Server introduces database backup compression starting from 2008 version.
There are some interesting moments.
Compressed backup is created with following command:
BACKUP DATABASE AdventureWorks
TO DISK = 'D:\DATABASE_BACKUPS\AW.bak' MIRROR TO DISK = 'H:\temp\AW.bak'
WITH INIT, CHECKSUM, FORMAT, COMPRESSION
Compression level can be found by finding backup set ID for specified backup by issuing following command:
select * from msdb..backupset order by backup_finish_date desc
where You find backup_set_id of the backup You made, and with this backup_set_id, execute following command:
SELECT backup_size/compressed_backup_size FROM msdb..backupset where backup_set_id = backup_set_id(change this backup_set_id with id from previous step)
And You will get backup compression ratio. In my case compression ratio was 4.33
Is backup You are going to restore compressed or not, You can find out by executing following command:
RESTORE HEADERONLY FROM DISK = 'H:\temp\AW.bak'
and look for a column named Compressed. If value is 0, than backup is not compressed, and if value is 1, than backup is compressed.
In order to reduce the size of backup files, SQL Server introduces database backup compression starting from 2008 version.
There are some interesting moments.
Compressed backup is created with following command:
BACKUP DATABASE AdventureWorks
TO DISK = 'D:\DATABASE_BACKUPS\AW.bak' MIRROR TO DISK = 'H:\temp\AW.bak'
WITH INIT, CHECKSUM, FORMAT, COMPRESSION
Compression level can be found by finding backup set ID for specified backup by issuing following command:
select * from msdb..backupset order by backup_finish_date desc
where You find backup_set_id of the backup You made, and with this backup_set_id, execute following command:
SELECT backup_size/compressed_backup_size FROM msdb..backupset where backup_set_id = backup_set_id(change this backup_set_id with id from previous step)
And You will get backup compression ratio. In my case compression ratio was 4.33
Is backup You are going to restore compressed or not, You can find out by executing following command:
RESTORE HEADERONLY FROM DISK = 'H:\temp\AW.bak'
and look for a column named Compressed. If value is 0, than backup is not compressed, and if value is 1, than backup is compressed.