问题描述
我在SSIS中构建了Foreach循环容器,该容器从目录中的多个excel(* .xlsm)文件中提取数据,然后将结果写入另一个位置。
[最终BCS描述]导致我出现问题。我尝试使用数据转换DT_WSTR。
我遇到错误:
由于从数据流列插入数据,可能会发生截断 长度为2000的“最终BSC描述副本” 列“最终BSC描述”,长度为255。
这没有道理。来源中的“最终BSC说明”大于255,目标中没有上限。有人可以提供解决方案或解决方法吗?
下面的错误消息。
SSIS package starting.
@R_523_4045@ion: 0x4004300A at Load Excel Files,SSIS.Pipeline: Validation phase is beginning.
Warning: 0x802092A7 at Load Excel Files,Excel Destination [12]: Truncation may occur due to inserting data from data flow column "copy of Final BSC Description" with a length of 2000 to database column "Final BSC Description" with a length of 255.
@R_523_4045@ion: 0x4004300A at Load Excel Files,Excel Destination [12]: Truncation may occur due to inserting data from data flow column "copy of Final BSC Description" with a length of 2000 to database column "Final BSC Description" with a length of 255.
Warning: 0x80049304 at Load Excel Files,SSIS.Pipeline: Warning: Could not open global shared memory to communicate with performance DLL; data flow performance counters are not available. To resolve,run this package as an administrator,or on the system's console.
@R_523_4045@ion: 0x40043006 at Load Excel Files,SSIS.Pipeline: Prepare for Execute phase is beginning.
@R_523_4045@ion: 0x40043007 at Load Excel Files,SSIS.Pipeline: Pre-Execute phase is beginning.
Error: 0xC0202009 at Load Excel Files,Excel Destination [12]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21.
An OLE DB record is available. Source: "Microsoft Access Database Engine" Hresult: 0x80040E21 Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value,if available. No work was done.".
Error: 0xC002F445 at Load Excel Files,Excel Destination [12]: An error occurred while setting up a binding for the "Control Design Rationale" column. The binding status was "DT_NTEXT".
Error: 0xC0202025 at Load Excel Files,Excel Destination [12]: Cannot create an OLE DB accessor. Verify that the column Metadata is valid.
Error: 0xC004701A at Load Excel Files,SSIS.Pipeline: Excel Destination Failed the pre-execute phase and returned error code 0xC0202025.
@R_523_4045@ion: 0x4004300B at Load Excel Files,SSIS.Pipeline: "Excel Destination" wrote 0 rows.
@R_523_4045@ion: 0x40043009 at Load Excel Files,SSIS.Pipeline: Cleanup phase is beginning.
Task Failed: Load Excel Files
Warning: 0x80019002 at Foreach Loop Container: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded,but the number of errors raised (4) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded,but the number of errors raised (4) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package finished: Failure.
解决方法
我不知道为什么会这样,但是字段的长度必须匹配我主要使用派生列并设置表达式来更改字符串的长度
,找到了解决方法。从 Excel Source的高级编辑器将数据类型更改为 Unicode字符串[DT_WSTR] 长度= 2000
在目标excel文件的“最终BSC描述”单元格中,添加长度大于255个字符的虚拟值。然后隐藏整行。
从stackExchange,选项2的帖子中获得了想法