SSIS File System Task Copy works in BIDS but not in job

  • I know I'm missing something simple, so I'm hoping someone else can tell me what it is.

    I have a NAS share to which I need to copy a zip file. The SQL 2008 SSIS package uses a File System task with a DestinationConnection of a File Connection Manager (\\NASshare\TeamFolder\Folder\). The SourceConnection is a variable that stores the path and dated zip file name. When I run this in BIDS, the file copies over correctly without errors. When I run this in a job, I receive the following error:

    Error: 2014-11-21 06:46:52.86

    Code: 0xC001401E

    Source: DetailReport Connection manager "eFolder"

    Description: The file name "\\NASshare\TeamFolder\Folder\" specified in the connection was not valid.

    End Error

    Error: 2014-11-21 06:46:52.86

    Code: 0xC001401D

    Source: DetailReport

    Description: Connection "eFolder" failed validation.

    End Error

    The login that owns the job is the SQL Server Agent account and does have read-write permissions on the folder in question. I have tested this by logging into the server using that login, opening the NAS folder in question and created a new text file on the folder.

    Most of the google results I receive on this error are in regards to renaming the file. I am not renaming the file, so haven't added the file name to the Destination path. Since it copies fine without the file name in the Destination when I run it, I don't think that's the problem with SQL Server running it.

    Any thoughts on what I might have missed?

    EDIT: Forgot to add screenshot of the task.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • This is getting seriously annoying. I tried switching out to a Script Task and again, this works in BIDS without an issue, but the SQL job seems to hate me today.

    It has to be a permission I missed somewhere, but I'm unsure of what since I can write to the directory using that login.

    Error: 2014-11-21 10:53:54.91

    Code: 0x00000001

    Source: Copy Detail Report to eFolder

    Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.UnauthorizedAccessException: Access to the path '\\NASshare\TeamFolder\Folder\Details_201411210952.zip' is denied.

    at Microsoft.VisualBasic.FileSystem.FileCopy(String Source, String Destination)

    at ST_ece75f85271046c584a94575b1eeaab9.vbproj.ScriptMain.Main()

    --- End of inner exception stack trace ---

    at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)

    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)

    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

    at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)

    at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()

    End Error

    I am using the FileCopy method of Visual Basic 2008.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply