免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5723 | 回复: 8
打印 上一主题 下一主题

求助!!用bcp命令把sybase12.5的数据导入到sybase11.9中报错! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-09 16:05 |只看该作者 |倒序浏览
小弟刚接触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

=========================

论坛徽章:
1
2017金鸡报晓
日期:2017-01-10 15:19:56
2 [报告]
发表于 2007-08-10 17:33 |只看该作者
bcp out 得时候加-J"CP850"试试

论坛徽章:
0
3 [报告]
发表于 2007-08-13 14:36 |只看该作者
不行啊, 提示信息大概是:
conversion is not available between character set cp850 and character set cp936。

论坛徽章:
1
2017金鸡报晓
日期:2017-01-10 15:19:56
4 [报告]
发表于 2007-08-13 17:38 |只看该作者
sp_configure "disable character set conversion"
看一下结果?

论坛徽章:
0
5 [报告]
发表于 2007-08-14 14:27 |只看该作者
字符集不匹配

论坛徽章:
0
6 [报告]
发表于 2007-08-14 14:38 |只看该作者
那我想把sybase12中的数据 导到sybase11中 要怎么做?

论坛徽章:
0
7 [报告]
发表于 2007-08-23 14:20 |只看该作者
sybase11中的字符集和排序改成和sybase12一样的试试

论坛徽章:
0
8 [报告]
发表于 2007-08-24 09:32 |只看该作者
同意楼上的!

论坛徽章:
0
9 [报告]
发表于 2007-08-26 10:37 |只看该作者
两边表结构的字段顺序和类型都是一致的吗? 怎么感觉像是顺序不一致的错误啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP