Backup Compression in SQL Server 2008 | SansSQL

Saturday, November 14, 2009

Backup Compression in SQL Server 2008

Backup Compression is a new feature in SQL Server 2008 that is introduced in SQL Server 2008. This new feature significantly reduces the backup and restore times as well as the size of the backups.
By default, backup compression is turned off on the server level.

Using this feature, the size of the backups can be kept small and the Backup and the restoration time will also be reduced.

To change the default configuration of Backup Compression, execute the below query

EXEC sp_configure 'show advanced options', 1

EXEC sp_configure 'backup compression default', 1

Use the Server Properties

1.       1. Go to the “Server Properties”.
2.       2. Select “Database Settings
3.       3. Click on the Check box “Compress Backup”.
4.       4. Click OK.

To compress the backups, follow the below steps

1.       1. Right-Click on the database which you want to backup.
2.       2. And Select Tasks
3.       3. Under Tasks Menu, Click on the “Back up” Option

4       4. In the backup window, select the “Backup type” and add the Destination.

1.       5. Now go to the “Options” page and select the Compression Options.
There are 3 options under compression
a.       Use the Default Server Setting
b.      Compress Backup
c.       Do not Compress Backup

The option “Use the Default Server Setting” will use the value that is set in server level.
By default, it will not compress the backups. But in our case the default server settings has been changed at the first, so the backups will be compressed.

The option “Compress Backup” will compress the backups and the option “Do not Compress Backup” will not compress the backups.

Now select either option “Use the Default Server Setting” or “Compress Backup” as both options will compress the backup because of the changes done to the server level in the beginning.

.       6. Click OK.
.       7. In the similar way take the backup of the same database setting the Compression option to “Do not  Compress Backup” and check the size difference of the both the backups.
You will find that the size of the compressed backup will be less.

To download the detailed test cases and testing results click here.

This article is also available in pdf format for downloading.
Please Click here to get your copy.

No comments:

Post a Comment