Unable to open host BCP Data file

  • When I executed the below command I am geting the error unable to open host bcp data file.

    bcp "select * from ##inteirsrvrs, onepoint..computermaintenance cm where idcomp = cm.idcomputer and cm.inmaintenancenow = 1" queryout "D:aveen\maintmode.txt" -c -SC105PC001\PC001 -T

    but when I this statement from dos it is executed.

    Can any one tell me what should be the problem and how to over come this.

    Thanks in advance

    Naveen

  • has your sqlserver instance service account been granted write or full access to your D:\ folder

  • Try this
    i think this seems to be exact file (dat file) not select where to import.
    example as below bcp "dbname.dbo.tablename" in "file location\dat file name" -N -S "server name" -T

    it's done.

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

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