|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, October 15, 2009 12:32 AM
Points: 14,
Visits: 45
|
|
I want to compress the values and insert/update to table and when selecting the values I want to decompress it and select.
Is there any functions/methods available in sql server 2005?. I can do it in Application side and send compressed values to database, but I want to do it in database itself.
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Tuesday, January 29, 2013 10:54 AM
Points: 3,837,
Visits: 3,821
|
|
Your description is pretty vague. Can you describe what you mean by compress/decompress. How about giving us some examples using SQL statements and sample data? It would help us help you quite a bit more.
John Rowan
====================================================== ====================================================== Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 4:39 PM
Points: 6,260,
Visits: 1,977
|
|
jagadish_sds (6/11/2008) I want to compress the values and insert/update to table and when selecting the values I want to decompress it and select.
Is there any functions/methods available in sql server 2005?. I can do it in Application side and send compressed values to database, but I want to do it in database itself.
you could create user defined functions for such things but client-side seems more appropriate for these things.
* Noel
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, October 15, 2009 12:32 AM
Points: 14,
Visits: 45
|
|
For example I get credit report as xml file and its around 6MB size. I can store it in database. Event I can zip (compress) and store it in Database the size of the credit report is very less.
The zip/unzip I want to do it in database while inserting/updating/selecting the credit report, not in application.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, October 15, 2009 12:32 AM
Points: 14,
Visits: 45
|
|
| do you know any specific user defined function for zip/unzip?
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Wednesday, February 20, 2013 1:39 AM
Points: 70,
Visits: 174
|
|
| search for the xpFileUtils.dll :this provides a set of extended stored procedures which will help to decompress/compress data using LZ/L7 algorithm.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 7:57 AM
Points: 2,621,
Visits: 2,758
|
|
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.
Author: SQL Server FineBuild 1-click install and best practice configuration of SQL Server 2012, 2008 R2, 2008 and 2005. 25 March 2013: now over 23,000 downloads. Disclaimer: All information provided is a personal opinion that may not match reality. Concept: "Pizza Apartheid" - the discrimination that separates those who earn enough in one day to buy a pizza if they want one, from those who can not.
|
|
|
|