在过去的一周中,我一直致力于在SSIS中创建一个包,该包将提取、转换数据,然后将数据从Access数据库加载到Server数据库。最初,我创建了两个单独的包来处理Access中从同一个表迁移的数据位,转换它,然后将其加载到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.预先感谢您的任何帮助,可以给予!
发布于 2017-11-09 21:37:36
我能够找到它;这是由于我试图加载包含一些空值的数据。通常情况下,这是可以的,但是我的SQL Server数据库(特别是数据被加载到的表)被设置为不允许Nulls。我认为这是导致问题的原因,即使OLE目标>表或视图快速加载检查上的“允许空”。
解决方案似乎要么修复Server表以接受Nulls,要么不尝试将空值加载到表中。我做了后者,一切正常(甚至不需要数据转换)。
发布于 2017-11-08 21:17:56
如果没有看到所有细节,我无法确定,但是根据错误和您对问题的描述,我怀疑您有一个外键关系,其中一些数据是在加载主键之前加载的。如果是这样的话,请考虑添加一个优先级约束来加载第一个表,然后使用同一个包中的两个单独的数据流加载第二个表。
https://stackoverflow.com/questions/47189314
复制相似问题