3

I have an existing legacy table that is ~180GB in size due to a client application storing PDF files as varbinary. I'd like to be able to compress that column for all rows using GZIP to help save space while I create a new solution (I was hoping there was a way to do it in SQL and not have to write client code for this). I see that the COMPRESS method is available for Sql Server 2016 but I need a solution that will work with 2008. Any ideas would be appreciated.

  • Although row/page compression is available in SQL 2008 R2, it does not compress LOB types. – Dan Guzman Jul 14 '18 at 20:14
3

You can use .NETs GZipStream Class with CLR to do the compression since you are on sql server 2008.

Solomon Rutzky has free CLR version (Util_GZip and Util_GUnzip functions) that you can test and use.

See : Alternative way to compress NVARCHAR(MAX)?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.