I am trying to import some data from a file to a MSSQL-2008 database table using the bcp utility provided with the unixODBC-2.3.0 package. The database is on a windows machine and I am running the bcp command from the Linux machine.

The problem which I am having is I am not getting any response after running the command and I am not getting the data imported in the target table. I don’t know what is going wrong, here is the command which I am using :

bcp target.dbo.CS_MASTER in data.dat -c -S XX.XX.XX.XX -e ERRORS.log -t "^$" -r "\r" -E  -U sa -P abc@123

where XX.XX.XX.XX is my IP of the machine. There is no output and no error in the log file specified.

The same bcp command is working fine when I am using it from windows cmd prompt.

有帮助吗?

解决方案

This issue is fixed. There were two versions of unixODBC driver installed in my machine that was causing the problem.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top