SQL Compression for Backups in SQL Server 2005
I want to backup my database with compression.
This is my code, which runs correctly in SQL Server 2008:
BACKUP DATABASE dbbbb
TO DISK = N'C:\\dbbb.bak'
WITH COMPRESSION;
My server ha开发者_Go百科s SQL Server 2005 and COMPRESSION
is not a recognized BACKUP option in 2005.
How can I compress my backups in SQL Server 2005?
You compress the generated file. Backup compression was added in 2008, so - sorry, out of luck.
Following on from TomTom, if you're in the situation with not enough disk space for your backup then you can attach an external USB drive or compress the target folder using NTFS
If you are stuck on 2005 and really would benefit, check out Red Gate (www.red-gate.com) SQL Backup Pro. It is a bit pricey but is a great backup tool with compression support for 2005 databases. I have used it in various rolls for years even on SQL 2008 and beyond. Great tool if you can justify the cost. Note: For me, compression did hit the 90% range consistently.
精彩评论