7

I have created an SSIS package that uses a File Systen Task (copy) that copies a file from 1 folder to another. The package runs fine when I run it from my local computer but when I import the package into our SQL Server and Create a Job to run the Package, the package fails and I see the following error in the log:

Started:  3:20:01 PM  
Error: 2013-03-27 15:20:01.70     
Code: 0xC002F304     
Source: copy template File System Task     
Description:
An error occurred with the following error message: 
    "Could not find a part of the path 
    'P:\IT\PROVIDERS\PROVIDERS AUDIT\File
    Template\QnxtProviderAuditList_yyyymmdd.xlsx'."  
End Error  
DTExec:
The package execution returned DTSER_FAILURE (1).  
Started:  3:20:01 PM  
Finished: 3:20:01 PM  
Elapsed:  0.452 seconds.  
The package execution failed.  The step failed.

The file path in the error is the file that needs to be copied (sourceconnection).

I can copy the file path directly from the error and go to it (via windows explorer) on the physical SQL Server machine so I do not understand why the package is saying it could not find the Path.

Does anyone have any idea why this package would run fine on my local machine but fails with the above error when run from the SQL Server? P:\ is a shared drive which the SQL Server has access to so I doubt it's an access/privileges issue.

8

Mapped drives, like P:\ in your case are dependent on the user logged in. Just because you can see the drive letter when logged into the server machine does not mean SQL Server can "see" the drive letter. If you specify the UNC (Universal Naming Convention) name in the path instead of using the drive letter, and the account SQL Server is using has access to the share and path, then it will work.

Instead of P:\mypath\myfile.txt use \\machine\share\mypath\myfile.txt

1

if you did what Max Vernon have suggested, make sure to use "Rename File" operation in your script task (yeah, you will be moving the file) enter image description here

  • 1
    Note: as people vote on answers, or others add answers, you can't assume that the answer you're referring to will still be obvious when you just refer to it as "above"; I recommend you note other answers by the username of the answerer, for clarity. – RDFozz Aug 8 '17 at 20:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.