我正在尝试使用SQL Server导出和导入向导将xsl电子表格文件导入SQL Server表。但是,它无法导入并返回以下消息:
验证:
Validating (Warning)
Messages
Warning 0x802092a7: Data Flow Task 1: Truncation may occur due to inserting data from data flow column "ObjectName" with a length of 255 to database column "ObjectName" with a length of 31.
(SQL Server Import and Export Wizard)
Warning 0x802092a7: Data Flow Task 1: Truncation may occur due to inserting data from data flow column "ShortDescription" with a length of 255 to database column "ShortDescription" with a length of 75.
(SQL Server Import and Export Wizard)
Warning 0x802092a7: Data Flow Task 1: Truncation may occur due to inserting data from data flow column "ObjectName" with a length of 255 to database column "ObjectName" with a length of 31.
(SQL Server Import and Export Wizard)
Warning 0x802092a7: Data Flow Task 1: Truncation may occur due to inserting data from data flow column "ShortDescription" with a length of 255 to database column "ShortDescription" with a length of 75.
(SQL Server Import and Export Wizard)
Warning 0x80049304: Data Flow Task 1: 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.
(SQL Server Import and Export Wizard)
复制时:
复制到[dbo]。[tblReports](错误) 消息
错误0xc0202009:数据流任务1:SSIS错误代码DTS_E_OLEDBERROR。发生OLE DB错误。错误代码:0x80004005。 OLE DB记录可用。来源:“Microsoft SQL Server Native Client 11.0”Hresult:0x80004005描述:“无法在对象'dbo.tblReports'中插入具有唯一索引'tblReports $ SheetName'的重复键行。重复键值为()。”。 (SQL Server导入和导出向导)
错误0xc0209029:数据流任务1:SSIS错误代码DTS_E_INDUCEDTRANSFORMFAILUREONERROR。 “Destination - tblReports.Inputs [Destination Input]”失败,因为出现错误代码0xC020907B,并且“Destination - tblReports.Inputs [Destination Input]”上的错误行处置指定出错时失败。指定组件的指定对象发生错误。在此之前可能会发布错误消息,其中包含有关失败的更多信息。 (SQL Server导入和导出向导)
错误0xc0047022:数据流任务1:SSIS错误代码DTS_E_PROCESSINPUTFAILED。组件“Destination - tblReports”(56)上的ProcessInput方法在处理输入“Destination Input”(69)时失败,错误代码为0xC0209029。标识的组件从ProcessInput方法返回错误。该错误特定于组件,但错误是致命的,将导致数据流任务停止运行。在此之前可能会发布错误消息,其中包含有关失败的更多信息。 (SQL Server导入和导出向导)
我怎样才能使这个工作?
答案 0 :(得分:0)
对于这两个警告:
警告0x802092a7:数据流任务1:由于可能发生截断 从数据流“ShortDescription”中插入长度的数据 255到数据库列“ShortDescription”,长度为75.(SQL 服务器导入和导出向导)
警告0x802092a7:数据流任务1:由于可能发生截断 从数据流列“ObjectName”插入长度为255的数据 到数据库列“ObjectName”长度为31.(SQL Server 导入导出向导)
您应该增加列大小,因为看起来您的数据不属于列的约束范围。