Bulk Insert from a Remote Machine

  • Hello All

    Wonder if anyone can help me with the following problem:

    I have a stored procedure which imports a text file into an SQL table - This works fine when the data is placed directly onto the SQL server - However when I try to perform this and have the stored procedure try to pick up the file directly from my remote machine I get the following error:

    Cannot bulk load because the file 'filename' could not be opened. Operating System error code 5 (error not found)

    I have checked that the file can be located using Windows Explorer so I am unsure what the problem is...

    Any help would be greay

    Thanks

    Bicky

  • I had exactly the same problem. The experts within my company persuaded me that there was no way around it except to use BCP instead of BULK INSERT. BCP is a pain to set up, but it does work very well. I store the BCP command in a batch file and call it from a C# program. I would be interested to know how to call it from a stored procedure. I don't know how to do that.

    🙂

  • I will give BCP a go....But would be useful to have the experts from here confirm that...

    If I can help you with the stored procedure then just ask

    Bicky;)

  • Tried BCP and got the same problem...I have checked other forums and have found somewhere where it's supposidly a bug in 2005 - This will get fixed in 2008 - Can anyone else confirm this

    Thanks

    Bicky

  • I thought it was a permissions problem so I googled it. Check this out, it might help:

    http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1140586&SiteID=17

    -- You can't be late until you show up.

Viewing 5 posts - 1 through 4 (of 4 total)

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