BCP Error = [Microsoft][ODBC SQL Server Driver]Unable to open BCP host data-file

  • I have researched the error with unable to open BCP host data-file and can't find my exact issue.

    EXEC master..xp_cmdShell 'bcp "AIH"."dbo"."400_CSV" out "\\aisql\AIH400_FHCF_Audit.csv" -c -T -S"aisql"'

    We have 4 other servers and the command works properly. On this particular server I can run this at the Command prompt and it requests a password. If I supply the sa password it works without a problem. How can I get around this statement executing in the context of sa as including the password for sa in a query is not an option.

    Thanks,

    Suzanne

  • You are trying to connect to the server using Windows Authentication (-T switch). I suspect the Windows account being used to run the BCP command doesn't have the necessary permissions on the server, so BCP is reverting to SQL authentication.

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

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