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


Error reading a csv (already open in Excel) using SSIS


Error reading a csv (already open in Excel) using SSIS

Author
Message
rohit.anshu
rohit.anshu
SSC Rookie
SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)

Group: General Forum Members
Points: 33 Visits: 80
hi,
I'm loading data into a table from a csv file using a data flow task.

If the file is already open by a user in Excel the SSIS is not able to read and instead throws out the message "The process cannot access the file because it is being used by another process"

This never happens if the csv is open in a notepad.

Is it possible that even if the file is pen in excel the SSIS can still read.Please remeber that SSIS just need to read the data and doesn't care about any unsaved data in the file.
sturner
sturner
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2214 Visits: 3259
push another copy of the file over for SSIS to use.... or push another copy over for users to look at.

The probability of survival is inversely proportional to the angle of arrival.
rohit.anshu
rohit.anshu
SSC Rookie
SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)

Group: General Forum Members
Points: 33 Visits: 80
thanks , I'm sure this soultion would work , howeevr i was still interested to know whether it is possible to use the same file in 'Read Only' mode just as we do in in windows.
Paul Hernández
Paul Hernández
Old Hand
Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)

Group: General Forum Members
Points: 376 Visits: 661
Hi,

just an idea. Maybe is an indirect way, but what about to use a Script Component or a Script Task and use C# to proccess the csv file. There is a method to open a file in Read mode in the System.IO.File. There are also several code snippets in the Web to read csv files with C# like here.

The problem with the flat file source is you cannot configure to many parameters, therefore you do not have too many options with it.

Hope this helps.

Kind Regards.

Paul Hernández
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