SSIS 错误 - 值违反了列的架构约束

SSIS error - value violated the schema's constraint for the column

使用 ssis 从 sql 服务器导出到 excel。 export 通过写入 excel 文件获得大约 80% 然后失败并出现此错误。它每次都停在同一行。正在写入的字段中的值在长度参数范围内,并且不包含任何古怪的字符。因为 35 行成功通过并写入 excel 文件,所以我假设数据类型是正确的(sql 服务器中的 nvarchar(max),SSIS 中的 DT_WSTR(4000))。还有什么其他事情可以触发此错误?使用 SSIS 2008,excel 2007 输出文件。

错误信息:

Error: 0xC0202009 at Data Flow Task 1, Excel Destination [1380]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x00040EDA. Error: 0xC020901C at Data Flow Task 1, Excel Destination [1380]: There was an error with input column "Chemicals" (1454) on input "Excel Destination Input" (1391). The column status returned was: "The value violated the schema's constraint for the column.".

Error: 0xC0209029 at Data Flow Task 1, Excel Destination [1380]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "Excel Destination Input" (1391)" failed because error code 0xC0209076 occurred, and the error row disposition on "input "Excel Destination Input" (1391)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.

Error: 0xC0047022 at Data Flow Task 1, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Excel Destination" (1380) failed with error code 0xC0209029 while processing input "Excel Destination Input" (1391). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.

我认为单个 Excel 列的限制实际上是 255 个字符。我将在 SSIS 流上游测试更长的值,然后拆分这些行或使用派生列截断长数据。