I have a SSIS package that fetches data from CSV files and retrieves them into tables. I have enabled logging throughout the package for errors and failure to a file. After the process is complete I zip all the files in the working folder (This includes the text file that I use for logging.) But during the zip process, I always encounter a file in use error. I believe this is not strange because the file is actually in use by the log provider. Is there a way to zip the file along with all the others? Or like I proposed in my Title, is there a log provider that can send these errors to a variable and then write them to a file and afterwards zip it. This way I am sure the file is not is use when I am executing the zip task. I am using 7-zip for my zip task process.
Asked
Active
Viewed 170 times
1 Answers
1
Since logging is enabled on the task , the file is being lock by the provider. Why not , leave the file from being zipped? See the example here on how to exclude a file type from command line with 7zip.
-
Even though this helped, I believe I have found a better solution. Obviously, you cannot log into a file the you are trying to zip at the same time. So I have disabled logging on the zip file and rather decided to send a notification email when the zip task fails. – maaizle Jun 07 '13 at 13:10