SSIS OLE DB Command处理Oracle NUMERIC(28,10)列失败求助
环境与场景
- 工具:Visual Studio 2019(原使用2022,因Excel连接管理器验证时程序冻结切换)
- 任务:将包含表头、多行共15列的Excel数据同步至Oracle数据库
- Oracle表字段类型:2个NVARCHAR2、4个NUMBER(38,0)、9个NUMBER(28,10)
- 数据流逻辑:Excel源 → 数据转换 → Lookup组件
- Lookup无匹配行:直接插入Oracle数据库
- Lookup有匹配行:进入OLE DB Command组件执行更新
已完成的配置操作
- 配置Oracle OleDBConnection管理器
- 设置OLE DB Command的
SqlCommand属性,示例语句:
UPDATE TABLEXYZ SET Field1 = ?, Field2 = ?, Field3= ?, Field4 = ? WHERE Field5 = ?
- 在「输入和输出属性」中手动为OLE DB Command Input添加外部列Param_0至Param_4并指定数据类型(操作Oracle目标时需手动配置)
问题现象
- 仅映射NVARCHAR2(对应SSIS类型
[DT_WSTR])、NUMBER(38,0)(对应SSIS类型numeric(18,0))字段时,执行完全正常 - 一旦SqlCommand和参数映射包含NUMBER(28,10)字段,OLE DB Command组件立即失败,报错信息如下:
[OLE DB Command [210]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "OraOLEDB" Hresult: 0x80004005 Description: "".
[OLE DB Command [210]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "OraOLEDB" Hresult: 0x80004005 Description: "1".(重复多次)
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE DB Command" (210) failed with error code 0xC0202009 while processing input "OLE DB Command Input" (215). 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.
已尝试的参数类型映射
针对Oracle的NUMBER(28,10)字段,已尝试将SSIS参数映射为以下类型,但均执行失败:
- numeric(18,0)(默认类型)
- numeric(28,10)
- numeric(38,10)
- Decimal
- Currency
求助
针对Oracle的NUMBER(28,10)列,OLE DB Command参数应配置何种SSIS数据类型才能正常执行更新?
内容的提问来源于stack exchange,提问作者Analytic Lunatic

