Quantcast
Channel: SQL Server Data Access forum
Viewing all articles
Browse latest Browse all 4164

Starting SSIS package from stored procedure – Can’t write data to Excel file.

$
0
0

I try to execute (set and start) SSIS package from C# via stored procedure (SP). In one of task, I need to save data to Excel file. This task generates the following error: “Opening the file XXX for writing failed. You do not have the correct permission”.

Then, I tested this SP from SSMS.

When I’m log in as window’s user, SP and the packaged is executed successfully. 

If I execute this SP (with “EXECUTE AS <windows user tested above>>”) as SQL user, the package fails with the same error as during testing from C#.

Is it possible to successfully execute above SP as SQL user?

If yes, any suggestion why it is not working in my situation?

Thanks

Viewing all articles
Browse latest Browse all 4164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>