[英]Binding errors in SSIS when importing from MySQL into SQL Server
I am pretty new to SSIS and have inherited a very simple package that imports data from a MySQL database into a SQL Server table (OLE DB Destination). 我对SSIS还是很陌生,并且继承了一个非常简单的程序包,该程序包将数据从MySQL数据库导入SQL Server表(OLE DB目标)。 The MySQL developer gave me a new query to use in place of the one currently used in the Data Flow Component (ADO.NET Source) which allegedly provides the same output columns as before.
MySQL开发人员给了我一个新查询,以代替当前在数据流组件(ADO.NET源)中使用的查询,该查询据称提供与以前相同的输出列。 I simply pasted it into the SqlCommand field in place of the existing query.
我只是将其粘贴到SqlCommand字段中,以代替现有查询。 But when I execute the package, I get five errors:
但是,当我执行程序包时,出现了五个错误:
Error: 0xC002F445 at Data Import, OLE DB Destination [202]: An error occurred while setting up a binding for the "Column1" column. The binding status was "DT_NTEXT".
Error: 0xC002F446 at Data Import, OLE DB Destination [202]: An error occurred while setting up a binding for the "Column2" column. The binding status was "DT_NTEXT". The data flow column type is "DBBINDSTATUS_UNSUPPORTEDCONVERSION". The conversion from the OLE DB type of "DBTYPE_IUNKNOWN" to the destination column type of "DBTYPE_WVARCHAR" might not be supported by this provider.
Error: 0xC002F445 at Data Import, OLE DB Destination [202]: An error occurred while setting up a binding for the "Column3" column. The binding status was "DT_TEXT".
Error: 0xC002F445 at Data Import, OLE DB Destination [202]: An error occurred while setting up a binding for the "Column4" column. The binding status was "DT_TEXT".
Error: 0xC002F445 at Data Import, OLE DB Destination [202]: An error occurred while setting up a binding for the "Column5" column. The binding status was "DT_NUMERIC".
I am using SSIS in SQL Server 2012 SP1. 我在SQL Server 2012 SP1中使用SSIS。 Note that the AllowImplicitStringConversion is set to True in the ADO.NET Source.
请注意,在ADO.NET源中,AllowImplicitStringConversion设置为True。 I had the MySQL developer give me a CSV of the result of running the query directly in MySQL so I could see what the data actually looks like.
我让MySQL开发人员为我直接在MySQL中运行查询的结果提供了CSV,以便我可以看到数据的实际外观。
Can anyone provide some guidance as to how I can resolve these issues? 谁能提供一些有关如何解决这些问题的指导?
By the way, what is the [202] in each error telling me? 顺便说一句,每个错误中的[202]告诉我什么?
Had a similar problem when importing from an Excel file (Excel source) into OLE DB Destination, which gave me an error message like yours. 从Excel文件(Excel源)导入OLE DB目标时遇到了类似的问题,这给了我类似您的错误消息。 It occured when there was a column in my Excel file that had more than 255 characters, which my package couldn't handle.
当我的Excel文件中有超过255个字符的列时,就会发生这种情况,而我的包无法处理。
The solution for me was to just export the columns to a text file and import that instead. 对我来说,解决方案是将列仅导出到文本文件,然后导入。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.