Skip to main content

We have the requirement that a user should be able to  write a flat csv file to a fileshare. This file is created in a task-script.

Because of security reasons the xp_cmdshell is turned off for ‘normal’ users. We can’t turn this on from a sql script with the command EXEC sp_configure 'xp_cmdshell', 1;

We had the idea to turn the xp_cmdshell on just before writing the file to the file share and directly after the file has been written we turn the xp_cmdshell off again.

The file is a csv file used for import in a financial system. 

What should be an alternative without giving anyone the xp_cmdshell rights in de SQL DB?

 

Hey Edwin,

Would the ‘Write file’ connector suffice? You can send the CSV data of the task to the connector, then write it to the location where you would like to have it.

Hope this helps!

Kind regards,
Mark Jongeling


I have to figure this out. Sounds if it could work!


Forgot to add, there's some documentation on the Write File connector here: https://docs.thinkwisesoftware.com/docs/sf/process_flows.html#write-file-to-disk

I think it can help you :wink:


Hi Edwin,

In general, I would go with Mark's suggestion. But if you really need to write files at (SQL) server side, then there are some specific stored procedures that can help. The following video shows how this works:

 


Reply