0

This is my first SSIS package and I have followed some tutorials and everything looked good until I ran it. I am trying to sync the data from a SQL Server 2008 database to a MySQL database (only 1 table with 2 columns). After running the package I get the following error.

[ADO NET Destination [16]] Error: An exception has occurred during data insertion, the message returned from the provider is: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"UPC", "Model") VALUES (p1, p2)' at line 1

And on the next line

[SSIS.Pipeline]
Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED.
The ProcessInput method on component "ADO NET Destination" (16) failed with error code 0xC020844B while processing input "ADO NET Destination Input" (19).
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.

My questions are:

  1. Why I am getting this error ?
  2. How to solve it ?
4

1 回答 1

1

检查有关 ADO.NET 和 MySQL 问题的 MSDN 链接:http: //blogs.msdn.com/b/mattm/archive/2009/01/07/writing-to-a-mysql-database-from-ssis.aspx

从 MSDN 文档:

注意,我建议在写入 MySQL 数据库时使用 ODBC 驱动程序,因为 MySQL .NET 连接器有一个额外的阻塞问题。如果你尝试一下,你会得到一个看起来像这样的错误:

Error: 2009-01-05 12:03:47.79 
   Code: 0xC020844B 
   Source: Data Flow Task 1 Destination - Query [28] 
   Description: An exception has occurred during data insertion, 
                the message returned from the provider is: 
                You have an error in your SQL syntax; check the manual that corresponds
                to your MySQL server version for the right syntax to use near 
                '"name", "date", "type", "remark") 
                VALUES (p1, p2, p3, p4), (p1,p2,p3,p4), (p1,p2' at line 1 
End Error

请注意,“VALUES”部分具有参数名称,而不是实际值。这似乎是 MySQL 提供程序为其 ParameterMarkerFormat 返回的值的问题。我确实发现了一个针对他们的错误,但看起来他们决定不修复它。我听说 DevArt dotConnect 驱动程序没有这个问题,但我自己无法尝试。

于 2012-10-29T07:30:30.773 回答