SSIS – Error 0xC020200E – Cannot open the datafile “PathToFile”

SSIS – Error 0xC020200E – Cannot open the datafile “PathToFile”

This error presented itself when attempting to run an SSIS package that needed to write to a file share across the network to another server. The package worked when executed using my local account from Visual Studio but not when invoked from a stored procedure or via SQL Server Agent. A fully qualified UNC path was being used. The Agent job Owner was set to the SQL Server service domain account.

My domain account was a member of a group which had full access to the file share allowing me to run the package locally. The SQL Server account was also a member of the same group, yet the package would return ‘Access Denied’ on the step that generated a csv file. I was about to resort to creating a Proxy account for the job step to run under, when an Server Admin granted the SQL Server Service account access to the network share individually rather than relying on its group membership. That grant to the account itself had done the trick in this case :-)

Leave a Reply

Your email address will not be published. Required fields are marked *