我有以下数据流
我需要使用ado.net连接器将行插入到平面文件和表格中
我总是收到此错误
[ADO NET Destination [2]] 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
'"utilisateur_id", "nom", "prenom", "type" at line 1
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "ADO NET Destination" (2) failed with error
code 0xC020844B while processing input "ADO NET Destination Input" (9). 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.
我已尝试搜索答案并找到此链接http://blogs.msdn.com/b/mattm/archive/2009/01/07/writing-to-a-mysql-database-from-ssis.aspx
但我真的不知道如何修复它。有更简单的方法吗?
答案 0 :(得分:2)
启动MySQL服务器并登录。运行以下命令,如图所示。通过将模式设置为“ANSI”,可以使语法更加标准,就像MySQL可以使用其他SQL模式来满足客户端一样。这就是为什么返回上面的错误,尽管语法本身看起来是正确的。实际上,在命令行上运行的create语句直接在MySQL上创建表无法创建表,并在使用SSIS创建同一个表时返回错误。
运行以下......
mysql> select @@global.sql_mode;
+-------------------+
| @@global.sql_mode |
+-------------------+
| |
+-------------------+
1 row in set (0.00 sec)
mysql> set global sql_mode='ANSI';
Query OK, 0 rows affected (0.01 sec)
mysql> select @@global.sql_mode;
+-------------------------------------------------------------+
| @@global.sql_mode |
+-------------------------------------------------------------+
| REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI |
+-------------------------------------------------------------+
1 row in set (0.00 sec)
mysql>
运行上述语句后,构建BI项目并执行包。这次执行将会成功。
还有一件事:
确保将 ADO NET目标上的ValidateExternalMetada设置为false ,否则您将陷入地狱之中超过3天
答案 1 :(得分:1)
使用Odbc数据提供程序让您自己头疼。
答案 2 :(得分:0)
这需要多长时间才能运行?我们在这里谈论了多少数据?
code 0xC020844B normaly means that that the connection to the database has timed out.