Backup compression was one of the attractive feature introduced in SQL Server 2008 Enterprise edition which is available in all edition from SQL Server 2008 R2. Compressed backup saves us both disk space and backup time with a cost of CPU consumption :)
We can take compressed backup by specifying with compression option when we take backup like mentioned below
BACKUP DATABASE [Database name] TO DISK = N'Path' WITH COMPRESSION
Instead of specifying compression in each backup lets see how to make it default in instance level
1)Using SSMS
Right click on the Instance name->Database setting and check the compress backup check box and now its done
2) Using script
We can use the below script to enable backup compression by default in server level
EXEC sys.sp_configure N'backup compression default', N'1'
GO
RECONFIGURE WITH OVERRIDE
GO
So from now it is not required to specify with compression in each backup and if we want to take a uncompressed backup we need to specify WITH NO_COMPRESSION
So lets see how much time and disk space compressed backup save, i will show you this my showing the values of a compressed and uncompressed backup i took
So from the above output its pretty clear how attractive is compressed backup and i would suggest compression to enabled in instance level as soon as we install server
No comments:
Post a Comment