Error = [Microsoft][ODBC Driver 11 for SQL Server]Unable to open BCP host data-file.
Error = [Microsoft][ODBC Driver 11 for SQL Server] Unable to open BCP host data-file.
- related to this error, it because of the BCP cannot open the output directory.
like: exec master..xp_cmdshell 'bcp "select * from [TestDB].[dbo].[tbl]" queryout "C:\Test"'
exec master..xp_cmdshell 'bcp "select * from [TestDB].[dbo].[tbl]" queryout "C:\Test\"'
- change the output directory from D:..\
D:..\
to C:..C:..\
, it will be okOK as iI used to meet this.