loopsfileforeachfailoverenumerator

FOR EACH LOOP Container working in SSIS but failing as an SQL Job or in SSISDB Integration Service Catalogs, Even after providing correct File path


I am transferring data from folder(contains CSV Files) to SQL Server database using FOR EACH LOOP Container in SSIS. That works well in SSIS but it is giving me an error while running as SQL Jobs or Execute in SSISDB Integration Service Catalogs. Even though file path is correct and works well in Visual Studio. Please see error below. Foreach Loop Container:Warning: The For Each File enumerator is empty. The For Each File enumerator did not find any files that matched the file pattern, or the specified directory was empty. Visual Studio Result SQL Server result (Reason for fail)

Any help is much appreciated.

I have tried to give DB read and write access to users.


Solution

  • I encounter the same issue. Issue was due to the reason as SQL job was running using sa account as owner but sa account donot have access of the file location. Once i provide access of the file location to sa account. For each loop was able to detect file path.