none
Unable to open BCP host data-file (again)

    Question

  • I see there are several threads concerning the bcp error "Unable to open BCP host data-file", and none of the solutions work for me.

    The data file that I am trying to bcp into MS SQL Server database is very large: 2.5GB
    and I suspect this is the problem since I cannot even use "more" on the file.

    G:\>"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp" dbnm..xxx in   
    xxx.dat -c -b10000 -Sdbsvr,6500 -T
    SQLState = S1000, NativeError = 0
    Error 
    = [Microsoft][ODBC SQL Server Driver]Unable to open BCP host data-file 
     
    01/21/2009 03:14  2,597,304,441   xxx.dat  
    19 File(s)        2,608,702,758 bytes  
    2 Dir(s)        125,654,343,680 bytes free  
     
    G:\>more  xxx.dat  
     
    Cannot access file G:\xxx.dat 

    Unless anyone has any great ideas, I will simply break up the file into smaller chunks and bcp in one chunk at a time.

    Tom

    Tom Stone
    Wednesday, January 21, 2009 8:43 PM

Answers

  • I forgot to mention that I have been using the G: drive for all other bcp tasks successfully.
     
    Apparently the G: drive is a shared drive and somehow associated with "Active Directory" which has some file size limits.

    Once created the 2.5GB file on the C: drive I was able to bcp the data into the MS SQL Server database.


    Tom Stone
    Wednesday, January 21, 2009 9:25 PM

All replies

  • Size is not the issue.

    Did you try using the full path "G:\xxx.dat"?

    This sounds like a security issue, not a BCP specific issue.  Is G: a mapped drive?  What are the rights on the file?


    Wednesday, January 21, 2009 8:48 PM
  • Yes.  I tried  using the full path "G:\xxx.dat" and got the same error.

    What about the "more" command getting the error .... "Cannot access file ..."


    Tom Stone
    Wednesday, January 21, 2009 8:54 PM
  • I forgot to mention that I have been using the G: drive for all other bcp tasks successfully.
     
    Apparently the G: drive is a shared drive and somehow associated with "Active Directory" which has some file size limits.

    Once created the 2.5GB file on the C: drive I was able to bcp the data into the MS SQL Server database.


    Tom Stone
    Wednesday, January 21, 2009 9:25 PM
  • What you describe is caused by a "delegation" problem in AD. 

    Please see one of the many threads on "BULK INSERT ACCESS DENIED".
    Wednesday, January 21, 2009 11:00 PM