Permissions problem after closing and opening SSBIS
The aim is to email a list of files in a network folder to a single email destination, one email for each file.
I have a ForEach Loop Container that reads a list of files in the directory and outputs the result to a variable [Files_In_Folder].
Within the container is a sendmail task that uses [Files_In_Folder] in an expression for the FileAttachment property.
I am building the package in SQL Server Business Intelligence Studio. When I built the package it completed successfully and emails all the files as expected...one email for each file.
The problem is that when I close SSBIS and then reopen and attempt to execute the package, it fails with a permission problem.
Error - [Send Mail Task] Error: Either the file "Manager_50000335_20110527.csv" does not exist or you do not have permissions to access the file.
This file does exist and I do have permisions to it.
When I remove the expression built for the FileAttachment property of the Sendmail task, it works again. So the issue is around the file attachment, but I am stumped at this point.
May 26th, 2011 8:35pm
When I remove the expression built for the FileAttachment property of the Sendmail task, it works again. So the issue is around the file attachment, but I am stumped at this point.
It could be that the FileAttachment name is not getting set correctly i.e. it is missin the File Path
Enable logging on your package to see what FileAttachment actually isJeff Wharton MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt) MCT, MCPD, MCITP, MCDBA Blog: MrWharty.wordpress.com
Free Windows Admin Tool Kit Click here and download it now
May 26th, 2011 9:08pm
HI,
I believe you File are genereted dynamically durning the Execution of the package or not present in the folder. Hence you are getting this error. Can you please
delayvaildation property at package level to true.
Please let me know if in case you need more information.
Regards
=========================
Naveen Kumar Thangaraj
Naveen Kumar
May 27th, 2011 11:14am
Thankyou naveen and jeff
It was a combination of both answers that provided the solution.
The files are generated dynamically and therefore failing upfront validation because they did not yet exist. I also did not include the filepath in the
fileattachments expression.
I'm not sure why it worked while I was buidling it, with those problems, but in any case it works now.
Free Windows Admin Tool Kit Click here and download it now
May 29th, 2011 10:03pm
No problem. Glad to hear you got it worked outJeff Wharton
MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt) MCT, MCPD, MCITP, MCDBA
Blog: http://mrwharty.wordpress.com/
Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
May 29th, 2011 10:04pm
No problem. Glad to hear you got it worked outJeff Wharton
MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt) MCT, MCPD, MCITP, MCDBA
Blog: http://mrwharty.wordpress.com/
Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
Free Windows Admin Tool Kit Click here and download it now
May 29th, 2011 10:04pm