[File System Task] Error: An error occurred with the following error message: "Access to the path is denied.".

I have a SSIS project with two tasks in it.  A back up database task and a file system task.
The back up database task backs up a database to a network folder.
The file system task is then supposed to make a copy of the backup file in the same folder.
The backup works but the file system task fails with the error in the title.
This is obviously a permissions problem but I'm perplexed as to why the first task succeeds and the second fails when they both involve the same folder.

I'm running the package in BIDS
I have administrative rights on both the server and the development machine BIDS is on.
I've tried running BIDS as administrator with the same results.
If I try copying the file to another folder on the server it fails.
If I try copying the file to the C: drive of the development machine it succeeds.

Any suggestions would be greatly appreciated.
leskellyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lcohanDatabase AnalystCommented:
Can you try save the SSIS as DTSX file and execute it from the OS via DTEXEC by double click that package to see if you get the same error. Then check to make sure the NT login you use to DTEXEC that package has read/write permissions into that particular folder at OS level.
Further - if you schedule the package then it will be SQL Agent Service startup account that must have rights on that folder.
0
leskellyAuthor Commented:
Hello Icohan,

Thanks for your response.  I double clicked on the file as you suggested which brought up the "Execute Package Utility".  I executed the package and still got an error although it now says, "[File System Task] Error: An error occurred with the following error message: "Access to the path '\\<Server>\<Path>\ClientTrackMigrationBackup2.BAK' is denied.".

I was logged in under my account which is a member of the network administrators group.
0
lcohanDatabase AnalystCommented:
Remember SSIS runs by default 4 tasks in parallel and maybe the backup is not done yet when second task kicks in and try to use it. Maybe all you need is to change the package to run only 1 task at a time - from BIDS package properties
0
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

leskellyAuthor Commented:
I have a success constraint between the two tasks but I tried running the file system task in a separate package by it's self and it still failed.

Any other ideas?
0
lcohanDatabase AnalystCommented:
And if you try to do it manually does it works? or is as you mentioned that "If I try copying the file to another folder on the server it fails."

If that's the case then that NT login does not have the necessary rights at the OS folder/file level.
0
leskellyAuthor Commented:
If I remote into the server I can copy and paste the file however If I try to do it directly from my development machine I get denied so it seems it has something to do with working over the network.
0
lcohanDatabase AnalystCommented:
Well...you gave the answer in your above posting and I hope you execute the package on the server and not on your dev machine and expect it to work- that is obviously why it can't perform the tasks it should. The only way this would work somehow is if that Server folder would be a share on your dev machine but that's definitely not recommended (especialy if the SQL server is a PROD box) as SSIS packages run ON the SQL Server either from SSIS store or as DTSX but ON that server. Anything else would fail as resources (folders\files) are related to the computer running the package unless shared as mentioned.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
leskellyAuthor Commented:
I made the folder a share for my account only and the package now succeeds.  Thanks for all of your help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.