How can I unzip a varbinary(max) value in a stored procedure? I'd like to implement or invoke a gunzip algorithm within TSQL code, preferably without enabling the CLR.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Look into sp_OACreate http://msdn.microsoft.com/en-us/library/ms189763.aspx
sp_oamethod http://msdn.microsoft.com/en-us/library/ms174984.aspx
You can write the value as a file using file system object, then use a command line gunzip program on it and the read the file using FSO back.
Yes this is not practical but I am not the type of guy who thinks in terms of impossible.