- 论坛徽章:
- 0
|
小弟刚接触sybase, 求助各位前辈一个困绕很久的问题,先谢啦!
用bcp命令把sybase12.5的数据导入到sybase11.9中:
源数据库
安装在aix上,sybase版本为12.5, 字符集cp936
目标数据库
安装在windows下,sybase版本为11.9,字符集cp850
源数据库是通过改进目标数据库得到的, 增加了其中一些字段的长度。
为了符合目标数据库的表结构, 我在源数据库中建了视图,使之与目标数据库中的表具有相同的字段。
我按照目标数据库的字段类型和长度 编辑了fmt文件,但是在导入11.9的时候报错:
//导出视图
C:\Documents and Settings\zz>bcp ynds..XXXXX out "d:\fff" -U"sa" -P"**
****" -S"M80" -f"d:\bcp.fmt"
Server Message: M80 - Msg 2401, Level 11, State 2:
Character set conversion is not available between client character set 'utf8' an
d server character set 'cp936'.
Server Message: M80 - Msg 2411, Level 10, State 1:
No conversions will be done.
Starting copy...
1000 rows successfully bulk-copied to host-file.
2000 rows successfully bulk-copied to host-file.
3000 rows successfully bulk-copied to host-file.
4000 rows successfully bulk-copied to host-file.
5000 rows successfully bulk-copied to host-file.
6000 rows successfully bulk-copied to host-file.
7000 rows successfully bulk-copied to host-file.
8000 rows successfully bulk-copied to host-file.
9000 rows successfully bulk-copied to host-file.
10000 rows successfully bulk-copied to host-file.
11000 rows successfully bulk-copied to host-file.
12000 rows successfully bulk-copied to host-file.
13000 rows successfully bulk-copied to host-file.
13343 rows copied.
Clock Time (ms.): total = 2000 Avg = 0 (6671.50 rows per sec.)
//导入
C:\Documents and Settings\zz>bcp yxds..XXXXX in "d:\fff" -U"sa" -P"" -S"
018136ZZ" -f"d:\bcp.fmt" -J"cp850"
Starting copy...
CSLIB Message: - L0/O0/S0/N20/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation
resulted in overflow.
CSLIB Message: - L0/O0/S0/N25/1/0:
cs_convert: cslib user api layer: common library error: The datatype value is ou
tside the domain of legal values for the datatype.
CSLIB Message: - L0/O0/S0/N20/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation
resulted in overflow.
CSLIB Message: - L0/O0/S0/N25/1/0:
cs_convert: cslib user api layer: common library error: The datatype value is ou
tside the domain of legal values for the datatype.
CSLIB Message: - L0/O0/S0/N20/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation
resulted in overflow.
CSLIB Message: - L0/O0/S0/N25/1/0:
cs_convert: cslib user api layer: common library error: The datatype value is ou
tside the domain of legal values for the datatype.
CSLIB Message: - L0/O0/S0/N20/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation
resulted in overflow.
CSLIB Message: - L0/O0/S0/N25/1/0:
cs_convert: cslib user api layer: common library error: The datatype value is ou
tside the domain of legal values for the datatype.
CSLIB Message: - L0/O0/S0/N20/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation
resulted in overflow.
CSLIB Message: - L0/O0/S0/N25/1/0:
cs_convert: cslib user api layer: common library error: The datatype value is ou
tside the domain of legal values for the datatype.
CSLIB Message: - L0/O0/S0/N20/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation
resulted in overflow.
CSLIB Message: - L0/O0/S0/N25/1/0:
cs_convert: cslib user api layer: common library error: The datatype value is ou
tside the domain of legal values for the datatype.
CSLIB Message: - L0/O0/S0/N25/1/0:
cs_convert: cslib user api layer: common library error: The datatype value is ou
tside the domain of legal values for the datatype.
CSLIB Message: - L0/O0/S0/N25/1/0:
cs_convert: cslib user api layer: common library error: The datatype value is ou
tside the domain of legal values for the datatype.
CSLIB Message: - L0/O0/S0/N20/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation
resulted in overflow.
CSLIB Message: - L0/O0/S0/N25/1/0:
cs_convert: cslib user api layer: common library error: The datatype value is ou
tside the domain of legal values for the datatype.
CSLIB Message: - L0/O0/S0/N20/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation
resulted in overflow.
CSLIB Message: - L0/O0/S0/N25/1/0:
cs_convert: cslib user api layer: common library error: The datatype value is ou
tside the domain of legal values for the datatype.
CSLIB Message: - L0/O0/S0/N25/1/0:
cs_convert: cslib user api layer: common library error: The datatype value is ou
tside the domain of legal values for the datatype.
CSLIB Message: - L0/O0/S0/N25/1/0:
cs_convert: cslib user api layer: common library error: The datatype value is ou
tside the domain of legal values for the datatype.
bcp copy in failed
========================= |
|