• nikhil.desai1 (9/19/2014)


    Hi,

    I our SQL server project we are using xp_cmdshell to generate .txt or .csv file. As per SQL sever hardening xp_cmdshell is a security risk. Is there any alternative to xp_cmdshell to generate .csv or text file.

    I have used SSIS instead of xp_cmdshell(disabled status) to generate text , csv etc files. But it takes more time to generate the text files as compared to xp_cmdshell.

    If there any alternative to xp_cmdshell then please let me know

    Thanks and Regards,

    Nikhil P Desai

    Out of curiosity, when you say that SSIS takes more time than xp_cmdshell, what kind of difference are you talking about, seconds or minutes or hours? If the SSIS is running on the same host as the SQL Server, then there is the option of using shared memory access, should be as fast/quick as the xp_cmdshell script.

    My thought is not to reinvent the wheel, SSIS is a quite stable, very configurable and secure platform for data extraction, it would take a very strong argument for not using it in this kind of scenario unless it's something that can be achieved using bcp (bulk copy program).

    😎