求助:bcp出错!
我从一个数据库(SYBASE12.5.0 FOR HP)中bcp某些表(表结构相同,数据不同)出来,没有错误,语法大概是:
bcp xxxx..xxxxx out xxxx.dat -c -t~ -Usa -Ppass1
拷贝到另一台服务器(SYBASE12.5.3 FOR WIN),使用bcp,语法大概是:
bcp xxxx..xxxxx in xxxx.dat -c -t~ -Usa -Ppass2
大部分都成功,只有一个表出错:
Starting copy...
1000 rows sent to SQL Server.
......
28000 rows sent to SQL Server.
CSLIB Message: - L0/O0/S0/N36/1/0:
cs_convert: cslib user api layer: common library error: The result is truncated because the conversion/operation resulted in overflow.
CSLIB Message: - L0/O0/S0/N36/1/0:
cs_convert: cslib user api layer: common library error: The result is truncated because the conversion/operation resulted in overflow.
CSLIB Message: - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation was stopped due to a syntax error in the source field.
29000 rows sent to SQL Server.
......
63000 rows sent to SQL Server.
CSLIB Message: - L0/O0/S0/N36/1/0:
cs_convert: cslib user api layer: common library error: The result is truncated because the conversion/operation resulted in overflow.
CSLIB Message: - L0/O0/S0/N36/1/0:
cs_convert: cslib user api layer: common library error: The result is truncated because the conversion/operation resulted in overflow.
CSLIB Message: - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation was stopped due to a syntax error in the source field.
64000 rows sent to SQL Server.
......
198000 rows sent to SQL Server.
CSLIB Message: - L0/O0/S0/N36/1/0:
cs_convert: cslib user api layer: common library error: The result is truncated because the conversion/operation resulted in overflow.
CSLIB Message: - L0/O0/S0/N36/1/0:
cs_convert: cslib user api layer: common library error: The result is truncated because the conversion/operation resulted in overflow.
CSLIB Message: - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation was stopped due to a syntax error in the source field.
199000 rows sent to SQL Server.
......
254000 rows sent to SQL Server.
CSLIB Message: - L0/O0/S0/N36/1/0:
cs_convert: cslib user api layer: common library error: The result is truncated because the conversion/operation resulted in overflow.
CSLIB Message: - L0/O0/S0/N36/1/0:
cs_convert: cslib user api layer: common library error: The result is truncated because the conversion/operation resulted in overflow.
CSLIB Message: - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation was stopped due to a syntax error in the source field.
CSLIB Message: - L0/O0/S0/N36/1/0:
cs_convert: cslib user api layer: common library error: The result is truncated because the conversion/operation resulted in overflow.
CSLIB Message: - L0/O0/S0/N36/1/0:
cs_convert: cslib user api layer: common library error: The result is truncated because the conversion/operation resulted in overflow.
CSLIB Message: - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation was stopped due to a syntax error in the source field.
bcp copy in partially failed
254148 rows copied.
Clock Time (ms.): total = 50172 Avg = 0 (5065.53 rows per sec.)
糟糕的是,原表已经删除了......
请问:这是什么引起的?怎么查?(90分)
另外,还有个小问题:bcp里-t后面跟的是分隔符,在上面的例子中是~,如果有某个表,包含了“~”字符,bcp回去的时候会不会出错?如果varchar字段里都包含了几乎所有的ASC字符,那该怎么办?(10分)