BULK INSERT Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MWMIL
    New Member
    • Sep 2008
    • 1

    BULK INSERT Question

    I use Bulk insert to put data to myTable.
    When the SQL server is in local machin, it works well. But when I put
    the data in a sql server situated not locally, then I get a error
    message like this:

    This post is similar to others, but am at a lost to fix it.

    Could not execute bulk insert because file 'Q:\SQLServerRe port\01_DataLoa d\
    01_Site.xls' could not be opened. Operating system
    error code 3(The system cannot find the path specified.).

    Running BULK INSERT from a Stored Procedure:
    BULK INSERT Eval_Site
    FROM 'Q:\SQLServerRe port\01_DataLoa d\01_Site.xls'
    with
    (
    keepnulls
    )

    The Q: Drive is the same as for SQL Server 2005 as the data file.

    What gives?
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Docs says:

    data_file

    Is the full path of the data file that contains data to import into the specified table or view. BULK INSERT can import data from a disk (including network, floppy disk, hard disk, and so on).

    data_file must specify a valid path from the server on which SQL Server is running. If data_file is a remote file, specify the Universal Naming Convention (UNC) name.
    Make sure your file can be seen from the sql-server.

    -- CK

    Comment

    • imtmub
      New Member
      • Nov 2006
      • 112

      #3
      make sure you can access the file and also check sql can read the file.

      Check also the drive letter you spicify you can browse. use command prompt.

      Comment

      Working...