SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS : Cannot open the datafile


SSIS : Cannot open the datafile

Author
Message
eric.ladouceur
eric.ladouceur
Valued Member
Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)

Group: General Forum Members
Points: 52 Visits: 1
Hi,

If I run the package from BIDS, it works fine. If I run the package inside Management Studio it works when I run it as a package.

It does NOT run when I schedule the job.

Error: 2008-03-12 10:51:56.16
Code: 0xC020200E
Source: Data Flow Task Flat File Destination [194]
Description: Cannot open the datafile "D:\old_timesheet_repos\TimeSheet\files\date.txt". End Error
Error: 2008-03-12 10:51:56.16
Code: 0xC004701A
Source: Data Flow Task DTS.Pipeline
Description: component "Flat File Destination" (194) failed the pre-execute phase and returned error code 0xC020200E. End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 10:51:55 AM Finished: 10:51:56 AM Elapsed: 0.344 seconds.
The package execution failed. The step failed.,00:00:01,0,0,,,,0

Any idea?

Thanks in advance.
Eric.
eric.ladouceur
eric.ladouceur
Valued Member
Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)

Group: General Forum Members
Points: 52 Visits: 1
I was able to fix the issue by giving full control to the 'users' group to the text file.
hitesh.ramchandani
hitesh.ramchandani
Valued Member
Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)

Group: General Forum Members
Points: 52 Visits: 54
Hi,

This issue normally comes up when the corporate policy hardens the servers thereby causing many security issues.
Many a times even granting full control to the user account under which the package runs, does not resolve the error. So what you will have to do is add the user under whose account the package runs to the destination servers "Power Users group". This will give some permissions to the user account and resolve the security issues.

Best Regards,
Hitesh
anil.kumars13
anil.kumars13
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 Visits: 31
Thank you, I came up with the same issue. but got it resolved by your post.
Thank you,
Anilkumar
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63846 Visits: 13298
anil.kumars13 (8/16/2013)
Thank you, I came up with the same issue. but got it resolved by your post.
Thank you,
Anilkumar


Remember that you now gave everyone full access to your data in the file.
Just sayin'...


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
anil.kumars13
anil.kumars13
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 Visits: 31
thanks for sharing the information

so, what we have to do to give access to particular user, who can run the job as well.

Thank you,
Anilkumar
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63846 Visits: 13298
anil.kumars13 (8/16/2013)
thanks for sharing the information

so, what we have to do to give access to particular user, who can run the job as well.

Thank you,
Anilkumar


Use proxies in the SQL Agent job.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
hitesh.ramchandani
hitesh.ramchandani
Valued Member
Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)

Group: General Forum Members
Points: 52 Visits: 54
Koen Verbeeck (8/16/2013)
anil.kumars13 (8/16/2013)
Thank you, I came up with the same issue. but got it resolved by your post.
Thank you,
Anilkumar


Remember that you now gave everyone full access to your data in the file.
Just sayin'...



Joen, can you elaborate how does everyone get access to the data, when only the specific user under whose account the package is run is added to power Users group? Does'nt seem to make a point..
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63846 Visits: 13298
hitesh.ramchandani (8/16/2013)
Koen Verbeeck (8/16/2013)
anil.kumars13 (8/16/2013)
Thank you, I came up with the same issue. but got it resolved by your post.
Thank you,
Anilkumar


Remember that you now gave everyone full access to your data in the file.
Just sayin'...



Joen, can you elaborate how does everyone get access to the data, when only the specific user under whose account the package is run is added to power Users group? Does'nt seem to make a point..


I wasn't referring to your post, but to the post by Eric:


I was able to fix the issue by giving full control to the 'users' group to the text file.


Doing this gives everyone who is a user full access to the data in the file.
It's much saver to use proxies in the SQL Agent job and give that proxy account specific permissions on that file/directory.

Even adding the proxy account to the Power User group might be insecure, as you're giving that account potentially too much permissions.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
nishav2
nishav2
SSChasing Mays
SSChasing Mays (603 reputation)SSChasing Mays (603 reputation)SSChasing Mays (603 reputation)SSChasing Mays (603 reputation)SSChasing Mays (603 reputation)SSChasing Mays (603 reputation)SSChasing Mays (603 reputation)SSChasing Mays (603 reputation)

Group: General Forum Members
Points: 603 Visits: 103
Hi All,

I have a SSIS package which get the result from a query and dumps that in a TXT file.
It runs well in BIDS. But when I scheduled this as SQL Agent job it fails saying "Cannot open the datafile "C:\SSIS\File_09112013.txt". End Error Code: 0xC004701A "

I have a variable which holds the filename "C:\SSIS\File_09112013.txt".

What is the solution for this?

Please suggest.

Thanks
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search