首页 > 解决方案 > MySQL 作为 ADO NET 目标导致 System.NullReferenceException

问题描述

我是SSDT的新手。我正在尝试通过某些转换将数据从 SQL Server 数据库导入 MYSQL。

如果我使用平面文件目标,它会完美执行。一旦我使用指向 MySQL 数据库的 ADO NET 目标,它就不起作用。如果我反转方向(将数据从 MySQL 到 SQL Server),它工作正常。

这是输出的堆栈跟踪:

SSIS package "E:\Project MMA\MPS Module\OLD Db Files\TestMigration\TestMigration\Package.dtsx" starting.
Information: 0x4004300A at Simple Test, SSIS.Pipeline: Validation phase is beginning.
Information: 0x4004300A at Simple Test, SSIS.Pipeline: Validation phase is beginning.
Information: 0x40043006 at Simple Test, SSIS.Pipeline: Prepare for Execute phase is beginning.
Information: 0x40043007 at Simple Test, SSIS.Pipeline: Pre-Execute phase is beginning.
Error: 0xC0047062 at Simple Test, ADO NET Destination [2]: System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.SqlServer.Dts.Pipeline.ADONETDestination.PreExecute()
   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPreExecute(IDTSManagedComponentWrapper100 wrapper)
Error: 0xC004701A at Simple Test, SSIS.Pipeline: ADO NET Destination failed the pre-execute phase and returned error code 0x80004003.
Information: 0x4004300B at Simple Test, SSIS.Pipeline: "ADO NET Destination" wrote 0 rows.
Information: 0x40043009 at Simple Test, SSIS.Pipeline: Cleanup phase is beginning.
Task failed: Simple Test
Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "E:\Project MMA\MPS Module\OLD Db Files\TestMigration\TestMigration\Package.dtsx" finished: Failure.

标签: mysqlado.netetlsql-server-data-tools

解决方案


推荐阅读