Script to Backup Single or Few SQL Databases with Compression In this way you can change the default as you like. Once it’s on, every time you backup they will all be compressed, until you change it again.
Type N’1’ is to turn on the Backup Compression default, and N’0’ is off. If you just want to turn on the Backup Compression default, you can launch SQL Server Management Studio (SSMS) and click New Query, input the following commands:ĮXEC sys.sp_configure N'backup compression default', N'1' Commands to Turn on The Backup Compression Default If you want to use compress option only when making specific backups, then you can add WITH COMPRESSION to the statement when you need. Using Script to Create Compressed SQL Database Backupsīasically, if you want to always backup database with compression, you can just use commands to turn on the default option of backup compression, then all backups will be compressed until you turn it off again. One Simpler Way to Enable SQL Database Backup Compression.Using Script to Create Compressed SQL Database Backup.
#Compress files on computer hdd how to#
In this article I will show you the specific steps of how to back up database in SQL Server using script with compression commands. To make use of this feature, you can either enable Backup Compression option with GUI, or use a backup script with compression command. MSSQL Backup Compression is a powerful feature on SQL Server 2008 and later versions, but it’s off by default. Therefore, you may wonder if there’s any way to create compressed backups. They take a lot disk spaces, and every time backing up databases or move around can be time-consuming. Is SQL Server Database Backup Compression Achievable?Īs using, the SQL Server databases can grow very big, so as the backups.