Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2007
    Posts
    212

    Unanswered: Bulk Importing from a Remote Data File

    Hi,

    I wish to import a data file that I have on a remote server into a sql server table

    Am using the UNC path as in the following example:

    Code:
    BULK INSERT SalesOrderDetail
       FROM '\\computer2\salesforce\dailyorders\neworders.txt';
    GO
    But I get an error saying unable to open file neworders.txt.

    How do I pass the login details to where the datafile is stored so that the above query can read the file?

  2. #2
    Join Date
    Sep 2011
    Posts
    75
    Hello,

    Is the folder having the file fully shared?

  3. #3
    Join Date
    Sep 2011
    Posts
    75
    Hello,

    Also check that xp_command shell is on? You can check it in sql surface area configuration

  4. #4
    Join Date
    Oct 2011
    Posts
    29
    Quote Originally Posted by jassi.singh View Post
    Hello,

    Also check that xp_command shell is on? You can check it in sql surface area configuration
    You do not need to turn xp_cmdshell on for bulk import.

    Please check if the folder share \\computer2\salesforce\dailyorders is accessible to the service account or not.

  5. #5
    Join Date
    Sep 2011
    Posts
    75
    Quote Originally Posted by ozzii View Post
    Hi,

    I wish to import a data file that I have on a remote server into a sql server table

    Am using the UNC path as in the following example:

    Code:
    BULK INSERT SalesOrderDetail
       FROM '\\computer2\salesforce\dailyorders\neworders.txt';
    GO
    But I get an error saying unable to open file neworders.txt.

    How do I pass the login details to where the datafile is stored so that the above query can read the file?
    Hello,
    Did your bulk import worked?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •