can we compress any file throgh SQL Server

  • Hi,

    Can we compress any file throgh SQL Server

    - using bcp, xp_cmdshell?

    - using sql_cmd?

    - stored procedure?

    ex:- saving the query results into file

    bcp "select * from [Instance Name].DBNAME.dbo.TableName " queryout "G:\Report.xls" -c -T -x'

    Thank you so much, in advance

    Phani

  • Phani

    Sure. If you have WinZip or another such utility installed, you can use xp_cmdshell, which you can also use for the COMPRESS command if you have the Windows Resource Kit. Alternatively, I believe that PowerShell will do compression for you.

    John

  • Thank you John , let me try this 🙂

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply