Does the BCP team give different results in SQL Server 2005 compared to 2008?

I executed two identical bcp commands on two different settings with the same data.

Machine A = Windows Vista machine running SQL Server 2008

Machine B = Windows Server 2003 machine with SQL Server 2005

The output text file of the bcp command is different! To start, Machine B does not append the column names to the beginning of the text file, and this seems to be wrong. Each line should be separated by line breaks, instead it seems that its line break is interrupted after two fields ?!

The bcp command is as follows:

bcp DBn_Mitor..TI40 out C:\prepTI4O.txt -c -T -t"\",\"" -r"\"\n\"" -S SQLServer01 -E 

What's going on here? What is the difference between SQL Server 2005 and 2008, which will make bcp work differently?

+4
source share
2 answers

BCP is a SQL tool, in 2008 there is another version, I think. I think that if you use BCP to export / import between versions, you should use RAW, not Native.

Of Access to SQL, the best option is to use a format file — more details can be found on MSDN.

http://msdn.microsoft.com/en-us/library/ms162802.aspx

0
source

Is the server updated or other DBMS tools installed? AKA, are you using the correct bcp.exe file?

I saw this before when the found "bcp.exe" when searching in the% PATH% variable is not the one you expect to run ...

0
source

Source: https://habr.com/ru/post/1300310/


All Articles