question

w.a avatar image
w.a asked

SSIS Package Foreach Loop Container not finding files when deployed (fine in DEV)

I have a SSIS package created in Visual Studio 2017 SSDT with Project Deployment model and parameters. I have a project parameter called RootPath which is the path to a folder where a bunch of csv or excel files are. I want to iterate this folder and load the files into SQL Server.

It is working fine when running the package in Visual studio SSDT. however when I deploy it to SQL server and run it, the output of the Foreach Loop container is Empty and therefore cannot find any files. Input files (Excel or CSV) are kept in a shared folder accessed using UNC path. I see this message in the log:

Loop_GetFiles: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.

SQL Server version is: Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64) and Visual studio 2017 SSDT version is SQL Server Data Tools 15.1.61903.01040.

I have set the Target SQL server version to SQL Server 2016 as the project is developed in Visual studio 2017 and project is deployed to SQL Server 2016 as there as some compatibility issue in script task creating GUID.

Has anyone else experienced this and discovered a workaround? Please help

Tried providing read/write access for the import file share to the account running SQL Server Agent service.

sql serverssis errorsql server 2016ssdtdeployment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.