【发布时间】:2014-11-15 21:19:19
【问题描述】:
我正在尝试将带有国家/地区列表的 excel 文件导入我的 SQL Server 数据库,但出现此错误。可能有什么问题?
验证(错误)
留言
错误 0xc020201b:数据流任务 1:Destination - countries.Inputs[Destination Input] 的输入列数不能为零。 (SQL Server 导入导出向导)错误 0xc004706b:数据流任务 1:“目的地 - 国家/地区”验证失败并返回验证状态“VS_ISBROKEN”。
(SQL Server 导入导出向导)错误 0xc004700c:数据流任务 1:一个或多个组件验证失败。
(SQL Server 导入导出向导)错误 0xc0024107:数据流任务 1:任务验证期间出现错误。
(SQL Server 导入导出向导)
这是我在 Excel 中的列表预览:
- 1 阿富汗 2 阿尔巴尼亚 3 阿尔及利亚 4 美属萨摩亚 5 安道尔
6 安哥拉 7 安圭拉 8 安提瓜和巴布达 9 阿根廷 10 亚美尼亚
11 阿鲁巴岛 12 澳大利亚
所以当我第一次导入临时表,然后尝试复制到我的表中时,我得到了这个错误:
- Copying to [dbo].[Countries] (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 11.0" Hresult: 0x80004005 Description: "Unspecified error".
(SQL Server Import and Export Wizard)
Error 0xc020901c: Data Flow Task 1: There was an error with Destination - Countries.Inputs[Destination Input].Columns[countryId] on Destination - Countries.Inputs[Destination Input]. The column status returned was: "The value violated the integrity constraints for the column.".
(SQL Server Import and Export Wizard)
Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Destination - Countries.Inputs[Destination Input]" failed because error code 0xC020907D occurred, and the error row disposition on "Destination - Countries.Inputs[Destination Input]" 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 - Countries" (46) failed with error code 0xC0209029 while processing input "Destination Input" (59). 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)
当我执行查询时,我得到:
Msg 2627, Level 14, State 1, Line 6
Violation of PRIMARY KEY constraint 'PK_dbo.Countries'. Cannot insert duplicate key in object 'dbo.Countries'. The duplicate key value is (1).
The statement has been terminated.
(26 行受影响)
【问题讨论】:
标签: sql-server excel