bcp 问题总结
来源:互联网 发布:c php扩展 编辑:程序博客网 时间:2024/04/29 18:59
一. Bcp 错误
ct_connect(): network packet layer: internal net library error: Net-Lib protocol driver call to connect two endpoints failed
Establishing connection failed.
无法连接远程服务器
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 conversion/operation was stopped due to a syntax error in the source field.
导入数据存在自增长列,但数据源不存在自增长列
blk_rowxfer(): blk layer: internal BLK-Library error: Data truncated while doing local character set conversion. col = 3
导入表对应的字段长度不足
ct_sendpassthru(): network packet layer: internal net library error: Net-Library operation terminated due to disconnect
CTLIB Message: - L5/O3/S5/N5/5/0:
字符集错误
Server Message: HSUN - Msg 7415, Level 10, State 1:
The transaction log in database DBNAME is almost full. Your transaction is being
suspended until space is made available in the log.
日志满,使用dump transaction DBNAME with truncate_only命令清日志
二. Bcp 导入不同字符集数据
bcp in到字符集是utf8的数据库时使用以下的参数,这样就可以解决java程序使用utf8字符集看中文是乱码的问题
bcp dbname..tabname in filename -Uxx -Pxx -Sxx -Jcp936 -c -Y
三. 注意事项
1. Tempdb的大小
当Sybase执行bcp in脚本时,会占用导入数据2倍的tempdb空间,因此在执行前要仔细估计最大的table的大小,保证有足够的tempdb空间。当空间不够时,要考虑用分割table或删除陈旧数据的方法缩小table的大小,或者考虑增加tempdb的大小。
2. 数据库配置选项的设置
当数据库执行bcp in脚本时会产生大量的log,为保证bcp in进程不致因为log溢出而中断,应该设置database的选项“truncate log on chkpt”为“true”。
虽然Sybase数据库是自优化的,但只要数据库是动态的,数据库碎片现象就会存在。在OLTP应用的场合,随着数据的不断增大,系统变得越来越缓慢,并且经常出现死锁时,应该检查数据库的碎片,并且采用以上方法进行优化。
实际上,应该定期做数据库的碎片整理,保证数据库的物理存储经常处于最优状态,相对于增加硬件而言,这是一种更好的保持数据库性能的低成本的途径。
- bcp 问题总结
- bcp 问题总结
- 【sybase】bcp 问题总结
- bcp 错误总结
- BCP导入数据出错总结
- sybase bcp的一些问题
- sqlserver bcp导出数据问题
- bcp
- bcp
- BCP
- BCP
- bcp
- BCP
- bcp
- 高分请教bcp导入数据问题,顶者有分
- bcp sqlcmd bulkinsert中unicode问题,Unexpected EOF encountered in BCP data-file
- 学习总结:sybase中bcp命令批量导出和导入
- sybase数据库bcp导入数据乱码、换行问题
- SYBASE 系统参数调整
- LoadRunner 简单笔记
- 数据逆向(二)——区分常量、变量、指针
- hp_ux11.11 下安装 sybase12.5.3
- 实现linux下的各种锁
- bcp 问题总结
- sybase 字符模式下新建库
- 获取当前事件的节点等等
- 未来网游三大主流技术
- 等待队列学习笔记
- 数据集——用于数据挖掘、信息检索、知识发现等
- 你必须知道--IE中的hasLayout
- web developer tips (75):PostBack后保持滚动条的位置
- 制作光盘封面资料