I have a query that I turned into a stored procedure in Microsoft SQL Server 2005 that is running to do calculations and I want the result set to be exported to a csv file. The stored procedure is being executed by a sql job. I can not use xp_cmdshell due to security violations. I would like to use bcp but it appears that it needs to use xp_cmdshell. I really don't want to use a batch file to do it. I would like to have two methods to accomplish this by a sql job. One method I would like to use CLR integration because this is enabled on the server. I don't care what the other method is but I just want to get the job done so I am open to suggestions. I only ask for two because I want to see what is easiest. I need to get this done within a few hours to a day because it is simple. I know this should be able to be accomplished with a few lines of code but just can't get what I had to work. This should be able to be performed by adding a few lines of code at bottom of procedure. Let me know your thoughts and time frame to work with me on it.
12 freelancers are bidding on average $31 for this job
BCP does not require xp_cmdshell. It sounds like you've already done the hard part--getting the data to look how you want it. Exporting it using BCP will be easy. Thanks!
Hi, I can do this with following methods in SQL 1. Using SQL subscription we can easily do this 2. SQL stored procedure to save result set into CSV 3 SSIS Thank you
Hi I can create a DTSX project in one hour and it will be executed by SQL JOB. Contact me and we will discuss further Wait for your response Thank you Ghazi Oualha