xp_cmdshell options???

  • Hello,

    mssql2005/sp2 on win2003

    i have a developer that has requested that xp_cmdshell be enabled so he can run code (stor proc) that will utilize the bcp command to quickly extract large amount of data from db into csv format (saved onto a share).

    based on screen results, the process is spawned by a user clicking "export" button (from web app) which calls pre-defined queries (the where clause in sql statement is dynamic). the web app code for current export function uses cold fusion (cf) and times out frequently ... the queries work fine against mssql ie: using mssql QA. Upgrading the CF app (or server its on) is not an option due to resource limitations.

    Currently, the developer is manually copying the user's query (its saved to a table as part of export button code) and using mssql import/export wizard to achieve results. (works fine)

    Any suggestions, experiences or work arounds to export data (large record sets)?

    ie: dts/ssis pkg using code?

    Many thanks. Jeff

  • PM me offline and I'll send you the code from an upcoming article I put in for publication here that does it in SQLCLR. Unless I can get permission to publish it here before the article gets approved and put on here.

    Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
    My Blog | Twitter | MVP Profile
    Training | Consulting | Become a SQLskills Insider
    Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]

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

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