SSIS 文本被截断,状态值为 4 [英] SSIS Text was truncated with status value 4

查看:48
本文介绍了SSIS 文本被截断,状态值为 4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发 SSIS 包,尝试从 CSV 平面文件更新现有的 SQL 表.除一列外,所有列均已成功更新.如果我在 truncate 时忽略此列,我的包将成功完成.所以我知道这是一个截断问题而不是错误.

I am developing a SSIS package, trying to update an existing SQL table from a CSV flat file. All of the columns are successfully updating except for one column. If I ignore this column on truncate, my package completes successfully. So I know this is a truncate problem and not error.

这一列几乎每一行都是空的.但是,有几行此字段为 200-300 个字符.我的数据转换任务将此字段标识为 DT_WSTR,但从我在别处阅读的内容来看,这可能应该是 DT_NTEXT.我两个都试过了,我什至将 DT_WSTR 设置为 500.但是这些都没有解决我的问题.我该如何解决?这个列在我的 SQL 表中应该是什么数据类型?

This column is empty for almost every row. However, there are a few rows where this field is 200-300 characters. My data conversion task identified this field as a DT_WSTR, but from what I've read elsewhere maybe this should be DT_NTEXT. I've tried both and I even set the DT_WSTR to 500. But none of this fixed my problem. How can I fix? What data type should this column be in my SQL table?

Error: 0xC02020A1 at Data Flow Task 1, Source - Berkeley812_csv [1]: Data conversion failed. The data conversion for column "Reason for Delay in Transition" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
Error: 0xC020902A at Data Flow Task 1, Source - Berkeley812_csv [1]: The "output column "Reason for Delay in Transition" (110)" failed because truncation occurred, and the truncation row disposition on "output column "Reason for Delay in Transition" (110)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
Error: 0xC0202092 at Data Flow Task 1, Source - Berkeley812_csv [1]: An error occurred while processing file "D:ftprootLocalUserRyanDaultonDocumentsBerkeley DemographicsBerkeley812.csv" on data row 758.

推荐答案

我怀疑或一个或多个字符在目标代码页中不匹配部分错误.

如果删除该列中带有值的行,它会加载吗?换句话说,您能确定导致包失败的行吗?可能是数据太长,也可能是 SQL Server 不喜欢其中的一些时髦字符.

If you remove the rows with values in that column, does it load? Can you identify, in other words, the rows which cause the package to fail? It could be the data is too long, or it could be that there's some funky character in there SQL Server doesn't like.

这篇关于SSIS 文本被截断,状态值为 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆