• You would need to do the compress / decompress in a CLR stored procedure or in a CLR function. CLR would need to be used because you would be accessing an external DLL to do the compress/decompress. If you take this route you will need extensive testing, especially to look for memory leaks in the external DLL. If memory does leak, then eventually you will have to restart SQL to reclaim the memory.

    It would probably be safer to get the application to do the compress/decompress, as this will keep any memory leaks outside of SQL Server and safeguard your SQL Server SLA.

    Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.

    When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara