You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

从SQL Server迁移至MySQL(SingleStore)时SSIS报“No data supplied for parameters”错误

SSIS迁移SQL Server到SingleStore(MySQL兼容)报错处理

问题情况

测试迁移仅含1个整数列(值为1)的SQL Server表到SingleStore时,SSIS数据流任务触发以下错误:

Error: 0xC020844B at Data Flow Task, ADO NET Destination [2]: An exception has occurred during data insertion, the message returned from the provider is: ERROR [HY000] [MySQL][ODBC 9.0(a) Driver][mysqld-5.7.32]No data supplied for parameters in prepared statement
Error: 0xC0047022 at Data Flow Task, SSIS.Pipeline: 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.

已完成的配置操作:

  • 源表与目标表列名、数据类型完全一致(均为nu整数列)
  • OLE DB Source连接SQL Server、ADO.NET Destination连接SingleStore均成功
  • 数据流任务前执行SET sql_mode= 'NO_ENGINE_SUBSTITUTION,ANSI_QUOTES';无报错
  • 测试OLE DB Source的“Table or view”和“SQL Command”两种模式
  • 通过ADO.NET Destination成功创建目标表,映射配置正确且预览正常,权限无问题

尝试使用ODBC Destination时,目标端无法显示列名,无法完成正常映射。

解决步骤

  1. 更换最新MySQL ADO.NET驱动
    卸载现有驱动,安装官方最新的MySQL Connector/NET,重新配置ADO.NET连接管理器。旧驱动与SingleStore的参数绑定逻辑可能存在兼容性问题。

  2. 改用SQL命令模式插入数据
    将ADO.NET Destination的数据访问模式从“Table or view”修改为“SQL command”,手动编写插入语句:

INSERT INTO test (nu) VALUES (?);

在参数映射环节,将源列nu绑定到语句中的?占位符,注意参数顺序与语句中的占位符顺序保持一致。

  1. 调整连接字符串参数
    在SingleStore的ADO.NET连接字符串中添加Allow User Variables=True和Ignore Prepare=True参数,强制驱动不使用预编译语句,规避参数绑定异常:
Server=你的服务器地址;Database=目标库名;Uid=账号;Pwd=密码;Allow User Variables=True;Ignore Prepare=True;
  1. 修正ODBC Destination配置
    若坚持使用ODBC Destination,需选择MySQL ODBC 8.0 Unicode Driver(避免使用旧版9.0(a)驱动),并在ODBC数据源配置的“高级”选项中设置SQL_MODE=ANSI_QUOTES。重新拖拽ODBC Destination组件后,即可正常加载目标表列并完成映射。

  2. 启用延迟验证
    在SSIS项目属性中,将DelayValidation设置为True,避免包加载阶段提前验证目标表结构导致的参数绑定错误。

内容的提问来源于stack exchange,提问作者elnaz fathi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.16 08:40:08