Share via

SSIS package fails to read file from UNC path in SQL Server Agent job (Error 0x80004005)

Thanyapong Latthikul 0 Reputation points
2026-02-18T11:58:59.3166667+00:00

SSIS package fails to read file from UNC path in SQL Server Agent job (Error 0x80004005)

We have an SSIS package that reads data from a file on a network share (UNC path). For example, the file is located at \\EXAMPLE_DOMAIN\SharedFolder\file.csv (domain and path are replaced with placeholders). The package runs successfully when executed manually or under a specific user context, but it fails when scheduled as a SQL Server Agent job. The job history shows Error code 0x80004005 when attempting to open the file, which is a generic "unspecified error" often related to access or connectivity issues.

Environment and Setup

SQL Server / SSIS version: (e.g., SQL Server 2017 with SSIS 2017 or higher).

Deployment: The SSIS package is stored in the SSIS Catalog (project deployment model) on the same server.

File location: A file on a remote Windows network share. For example: \\EXAMPLE_DOMAIN\SharedFolder\file.csv.

Execution context: The job runs under the default SQL Server Agent service account by default. That account has been granted read permission on the share.

Package configuration: ProtectionLevel is set to DontSaveSensitive, and all connection strings and package parameters are confirmed to be correct.

Troubleshooting Steps and Observations

Job step type: The SQL Agent job step is configured to run the SSIS package from the SSISDB catalog. It runs under the default Agent service account. In this configuration, the package fails when trying to open the file on the UNC share.

Proxy test: We created a SQL Agent proxy using a domain user credential that has access to the shared folder, and set the job step “Run as” that proxy account. Under that user context, the package executes successfully and reads the file without errors.

Permissions: The SQL Agent service account (e.g. NT SERVICE\SQLSERVERAGENT or a domain service account) has been granted read permission on the UNC share. Despite this, the job still fails when running under that account.

Manual execution: Running the SSIS package manually (for example, via Visual Studio or using DTExec on the server) under our domain user account successfully reads the file. This confirms that the UNC path and user credentials are correct when the package runs interactively.

Error context: The 0x80004005 error appears only when the package is run by SQL Agent under the default execution context. This suggests it is a permissions or authentication issue specific to the Agent’s job context (possibly related to Kerberos delegation or a double-hop problem).

Question: How can we configure the SSIS package or the SQL Server Agent job so that it can access the UNC share and read the file successfully when run as a scheduled job? Are there known issues or recommended settings (such as Kerberos delegation, service account configuration, SQL Agent proxies, etc.) to allow SSIS packages to access network file shares during Agent execution? Any ideas or solutions to resolve the error 0x80004005 in this scenario would be greatly appreciated.

SQL Server Integration Services

Answer recommended by moderator
  1. Erland Sommarskog 133.6K Reputation points MVP Volunteer Moderator
    2026-02-18T21:42:56.0266667+00:00

    Permissions: The SQL Agent service account (e.g. NT SERVICE\SQLSERVERAGENT or a domain service account) has been granted read permission on the UNC share. Despite this, the job still fails when running under that account.

    That account is a machine-local account, so you cannot grant access on resources on another machine to that account.

    Your options are:

    1. Use the proxy account with the domain user.
    2. Run SQL Server under a domain account, for instance gMSA.
    3. Grant access to the UNC path to the machine account, DOMAIN\MACHINE$. This is an option I recommend against, since this means that anyone who is logged on to the SQL Server machine, can access the file.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Yitzhak Khabinsky 27,101 Reputation points
    2026-02-18T19:32:28.56+00:00

    @Thanyapong Latthikul

    Please try to grant permissions on the UNC path.

    On the file server:

      • Add the executing account (Agent service account or proxy account) to both:
      • Share permissions (Read or Read/Write as needed).
      • NTFS permissions (Security tab).
    • Test from the SQL Server machine:
    whoami
    Test-Path \\server\share\folder\file.csv
    

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.