Am attempting to use SSIS flat file source to read a log file being actively written to. Looping and waiting for the file to be released is not practical as this is an active log file held by a service.
Ideally, I'm looking for a setting upon the flat file source, similar to the C# code below. If not that, what route can I take to read the flat file? I'm attempting to stay within SSIS as I sincerely can't believe this can't be done with stock parts and assume I'm just missing something.
Using C#, I can successfully open the exact file upon which the flat file source errors
System.IO.FileStream file
= new System.IO.FileStream
(
file_to_hash.FullName
, System.IO.FileMode.Open
, System.IO.FileAccess.Read
, System.IO.FileShare.ReadWrite
);
This is the error message experienced in SSIS: Warning: 0x80070020 at Data Flow Task, Flat File Source [1]: The process cannot access the file because it is being used by another process. Error: 0xC020200E at Data Flow Task, Flat File Source [1]: Cannot open the datafile "XXX".