我正在尝试使用SSIS从excel文件加载记录。我创建了一个数据流,添加了一个excel源,选择了我的文件和工作表,然后向SQL Server 2014添加了一个destintation源,并尝试上传到我使用与excel表相同的列名创建的表。我一直收到这个错误。
警告:SSIS警告代码DTS_W_MAXIMUMERRORCOUNTREACHED。执行方法成功,但引发的错误数(3)达到允许的最大值(1);导致失败。当错误数达到MaximumErrorCount中指定的数量时,会发生这种情况。更改MaximumErrorCount或修复错误。
以下是OneDrive中我的Excel文件的链接:http://1drv.ms/1HIyb2J
[SSIS.Pipeline] Warning: 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.
[Excel Source [20]] Error: There was an error with Excel Source.Outputs[Excel Source Output].Columns[chemical_name] on Excel Source.Outputs[Excel Source Output]. The column status returned was: "Text was truncated or one or more characters had no match in the target code page.".
[Excel Source [20]] Error: The "Excel Source.Outputs[Excel Source Output].Columns[chemical_name]" failed because truncation occurred, and the truncation row disposition on "Excel Source.Outputs[Excel Source Output].Columns[chemical_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 Excel 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.
Warning: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (3) 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.Pipeline] Information: "OLE DB Destination" wrote 0 rows.
我一直在这里解决这个问题:http://www.bradleyschacht.com/excel-source-the-output-column-failed-becuase-truncation-occured/
但是在300
中将chemical_name输出列的长度更改为advanced editor
(我的最大列为275)之后,仍然会产生错误。
解决方法
实际上让它发挥作用的是将TruncationRowDisposition
从RD_FailComponent
设置为RD_IgnoreFailure
。虽然我不认为这是一个好主意,但我宁愿找到错误的实际修复。