SSIS 错误:“转换规范的字符值无效”
Posted
技术标签:
【中文标题】SSIS 错误:“转换规范的字符值无效”【英文标题】:SSIS Error: "Invalid character value for cast specification" 【发布时间】:2014-08-29 01:19:20 【问题描述】:我正在尝试导入一个包含 18 列的 Excel 文件 (.xls);第一行有列名。该文件包含 3718 行学生个人数据。这是我在将文件导入 SQL Server 数据库时收到的错误:
- Copying to [dbo].[masterlist$] (Error)
Messages
* Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Invalid character value for cast specification".
(SQL Server Import and Export Wizard)
* Error 0xc020901c: Data Flow Task 1: There was an error with input column "dbirth" (121) on input "Destination Input" (84). The column status returned was: "Conversion failed because the data value overflowed the specified type.".
(SQL Server Import and Export Wizard)
* Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "Destination Input" (84)" failed because error code 0xC020907A occurred, and the error row disposition on "input "Destination Input" (84)" 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.
(SQL Server Import and Export Wizard)
* Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination - masterlist$" (71) failed with error code 0xC0209029 while processing input "Destination Input" (84). 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.
(SQL Server Import and Export Wizard)
* Error 0xc02020c4: Data Flow Task 1: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.
(SQL Server Import and Export Wizard)
* Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Source - masterlist$" (1) returned error code 0xC02020C4. 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.
(SQL Server Import and Export Wizard)
【问题讨论】:
不确定某些错误是否是其他错误的直接结果,但我怀疑这很可能。但是 - 至少有一个分娩日期在 Excel 电子表格中的格式不正确。可能所有的日期格式都是错误的。不确定它是否需要 dd/mm/yyyy 或 mm/dd/yyyy 等。 【参考方案1】:这是两个相关的错误:
“转换规范的字符值无效”
“转换失败,因为数据值溢出了指定的类型。”
您的输入 (Excel) 数据很可能格式不正确或无效。
没有看到您的输入文件和目标表很难提供帮助,但您应该尝试自己研究这些错误。
【讨论】:
以上是关于SSIS 错误:“转换规范的字符值无效”的主要内容,如果未能解决你的问题,请参考以下文章
SSIS部署:SQL Server部署中的SSIS包运行时错误
[Excel 源 [37]] 错误:SSIS 错误代码 DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER