How to write stored procedure output directly to a file on an FTP without using local or temp files? | I want to get the results of a stored procedure and place them into a CSV file onto an FTP location.


The catch though is that I cannot create a local/temporary file that I can then FTP over.


The approach I was taking was to use an SSIS package to create a temporary file and then have a FTP Task within the pack to FTP the file over, but our DBA's do not allow temporary files to be created on any servers.


[in reply to Yaakov Ellis](https://stackoverflow.com/questions/20587/execute-stored-procedure-sql-2005-and-place-results-into-a-csv-file-on-a-ftp-lo#20596)
-----------------------------------------------------------------------------------------------------------------------------------------------------------


I think we will need to convince the DBA's to let me use at least a share on a server that they do not operate, or ask them how they would do it.


[in reply to Kev](https://stackoverflow.com/questions/20587/execute-stored-procedure-sql-2005-and-place-results-into-a-csv-file-on-a-ftp-lo#20689)
--------------------------------------------------------------------------------------------------------------------------------------------------


I like the idea of the CLR integration, but I don't think our DBA's even know what that is *lol* and they would probably not allow it either. But I will probably be able to do this within a Script Task in an SSIS package that can be scheduled.