Home Forums SQL Server 7,2000 T-SQL BCP error -Unable to open BCP host data-file RE: BCP error -Unable to open BCP host data-file

  • This can also be caused by the account BCP is using, since you are using SQL Login, this will be either:

    Your account if excuted from Command line

    The SQL Server service account if using xp_cmdshell

    SQL Server Agent service account, if it is being executed in a CmdExec or T-SQL with xp_cmdshell step. The account can be configured within the Job as well.

    The BCP account needs access to the file, for UNC this includes the share.

    A trick for Local Service is to grant the SQL Server Computer account these network permissions.

    For UNC with the service using a Domain account, the permissions should be verified by logging in as the service account, browse to the file in question, and run BCP from the cmd line.

    Andy