Bulk Insert - Local Data Files

  • When using the T-SQL Bulk insert command from SQL Server Management Stuidio, how does one reference a file on his local machine as opposed to a file on the sql server. I am getting the error "Cannot bulk load. The file "C:\3005PAIDS.txt" does not exist" and expect that the system is looking for the file on the server. Is there a way to use the bulk insert command and reference a data file on my local machine?

  • Use UNC paths:

    \\yourcomputername\sharename\filename.csv

    Bulk inserts use delegation, so make sure your share can be accessed by the user that performs the BULK INSERT command in SQL Server.

    -- Gianluca Sartori

Viewing 2 posts - 1 through 1 (of 1 total)

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