SSIS截断错误

SSIS truncation error

首先,我搜索了又搜索又搜索,但没有找到任何对我有帮助的东西。

我有一个 SSIS 项目,它将从 iSeries AS400 获取大量数据,它通过两个截然不同的步骤来完成。 第 1 步完美运行,因此我设法从 AS400 获取大量信息,因此连接本身不是问题。

第二步严重失败,出现以下三个错误代码:

    [OLE DB Source [41]] Error: There was an error with OLE DB
Source.Outputs[OLE DB Source Output].Columns[NAME] on OLE DB
Source.Outputs[OLE DB Source Output]. The column status returned was: "Text
was truncated or one or more characters had no match in the target code 
page.".

    [OLE DB Source [41]] Error: The "OLE DB Source.Outputs[OLE DB Source 
Output].Columns[NAME]" failed because truncation occurred, and the
truncation row disposition on "OLE DB Source.Outputs[OLE DB Source
Output].Columns[NAME]" specifies failure on truncation. A truncation error
occurred on the specified object of the specified component.

    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The
PrimeOutput method on OLE DB Source returned error code 0xC020902A.  The
component returned a failure code when the pipeline engine called
PrimeOutput(). The meaning of the failure code is defined by the component,
but the error is fatal and the pipeline stopped executing.  There may be
error messages posted before this with more information about the failure.

我拼命地试图找到解决这个问题的方法,这就是我所做的(根本没有帮助):

1 - SOURCE 上的高级编辑器 -> 选项卡:输入和输出属性 -> OLE DB 源输出 -> 输出列更改为 a) 长度为 40(从 28 开始)- 没有变化 b) 数据文本(来自字符串)——完全崩溃 c) 将代码页从 1251 更改为 UTF-8 - 没有变化

2 - 在 MSSMS 中使用 OPENQUERY 获取信息,完美运行。

3 - 对着屏幕沮丧地尖叫(无济于事)。

我在路的尽头。我不知道该怎么办了。帮忙...?

是的,这简直让人抓狂。

OLE DB 源输出下有两组列:"External Columns"和"Output Columns"。

您是否尝试过更改 列的长度 - 外部列下的 "Name" 列和 "Output Columns" 下的列?

这种错误通常是由于外部列定义与其对应的输出列不匹配造成的。

在 OLE DB 源中,外部列应该根据源数据类型自动输入:外部提供者应该与 SSIS 讨论元数据,例如 "well, this column is typed String(40)"。但是提供商或 SSIS 通常 "less than entirely competent" 正确设置类型和长度。

更新:您是否尝试过独立于 SSIS 检查源中数据的长度?类似于:

SELECT MAX(Len(TheReallyAnnoyingColumn)) FROM TheTable

您可能会发现将“源代码编辑器”对话框中的“截断错误输出”设置为 "Ignore Failure" 可以解决此问题。

更新 - 截断重定向:-

强制截断姓氏 - 输出设置为重定向 并在错误输出上启用数据查看器

然后将该行从数据查看器复制到记事本以显示错误

运行 相同的 dtsx wif 截断设置为失败 :-

其他人都在关注截断。我对错误消息的 一个或多个字符在目标代码页 部分不匹配感到好奇。

列在 IBM i 上实际是如何定义的?我对编码字符集标识符(又名 CCSID)特别感兴趣

在绿屏中,您可以使用显示文件字段描述 (DSPFFD) 命令。

您也可以使用 iNav GUI。