【问题标题】:SSIS OLE DB Error Issues [closed]SSIS OLE DB 错误问题 [关闭]
【发布时间】:2018-04-21 16:58:29
【问题描述】:

在过去的一周里,我一直致力于在 SSIS 中创建一个包,它将从 Access 数据库中提取、转换数据,然后将数据加载到 SQL Server 数据库中。最初,我创建了两个单独的包来处理从 Access 中的同一个表迁移数据位,对其进行转换,然后将其加载到 SQL Server 中的两个不同表中。这些是单独工作的,但现在我试图将它们折叠成一个包。

根据我的调查,这是非常可行的(拥有一个包含两个源和目标的数据流的包),但由于某种原因,我无法让它工作。查看我得到的错误代码,人们建议使用数据转换,但我之前遇到过关于我使用数据转换解决的数据类型的错误。

我运行包时SSIS向我抛出的错误如下:

Error: 0xC0202009 at Data Flow Task, InfoTable [52]: 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".
Error: 0xC020901C at Data Flow Task, InfoTable [52]: There was an error with InfoTable.Inputs[OLE DB Destination Input].Columns[Copy of Parameter] on InfoTable.Inputs[OLE DB Destination Input]. The column status returned was: "The value violated the integrity constraints for the column.".
Error: 0xC0209029 at Data Flow Task, InfoTable [52]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "InfoTable.Inputs[OLE DB Destination Input]" failed because error code 0xC020907D occurred, and the error row disposition on "InfoTable.Inputs[OLE DB 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.
Error: 0xC0047022 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "InfoTable" (52) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (65). 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 ms-access ssis database-migration error-code


【解决方案1】:

我能弄明白;这是由于我试图加载的数据包含一些空值。通常这会很好,但我的 SQL Server 数据库(特别是正在加载数据的表)设置为不允许 Null。我相信这就是导致问题的原因,即使 OLE DB 目标 > 表或视图上的“允许空值” - 检查快速负载。

解决方案似乎是修复 SQL Server 表以接受 Null,或者不尝试将空值加载到表中。我做了后者,一切正常(甚至不需要数据转换)。

【讨论】:

  • 错误消息中最重要的部分是“值违反了列的完整性约束”。这通常意味着您在表定义中遇到了 NOT NULL 约束。
【解决方案2】:

如果没有详细查看所有内容,我不能肯定地说,但根据错误和您对问题的描述,我怀疑您有外键关系,并且在加载主键之前加载了一些数据.如果是这样,请考虑添加优先约束以使用同一包中的两个单独的数据流加载第一个表,然后加载第二个表。

【讨论】:

  • 我认为您可能正在做某事。我正在加载的两个表都在另一个表中作为外键引用;但是,它们都没有外键。我还需要提供哪些其他详细信息来帮助其他人帮助我解决此问题?
猜你喜欢
  • 1970-01-01
  • 2016-11-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多