Oracle 的更新语句在 SSIS 执行 SQL 任务中失败
我必须执行一些从 SSIS 到 Oracle 的更新语句,我无法将其放入存储过程中。该语句在 Oracle 中运行良好,但从 SSIS 执行时出现错误。我正在使用具有 SQL Source Type = Direct Input、BypassPrepare = True 属性的执行 SQL 任务。执行任务时,它只会挂起 20 分钟左右。然后我点击停止调试。
UPDATE Table1 R
SET R.Column1 =
(SELECT SUM (Column2)
FROM Table2 M
WHERE
M.Column3 IS NULL AND M.Column4 = R.Column4)
WHERE EXISTS ( SELECT Column4 AS Column4
FROM Table2 M
WHERE
M.Column3 IS NULL AND M.Column4 = R.Column4
GROUP BY Column4) `
I have to execute some Update statements from SSIS to Oracle which I cannot put into a stored Proc. This statement runs fine in Oracle, but I get error when executing from SSIS. I am using an Execute SQL Task with properties SQL Source Type = Direct Input, BypassPrepare = True. On executing the task, it just hangs for 20 minutes or so. Then I clicked on stop debugging.
UPDATE Table1 R
SET R.Column1 =
(SELECT SUM (Column2)
FROM Table2 M
WHERE
M.Column3 IS NULL AND M.Column4 = R.Column4)
WHERE EXISTS ( SELECT Column4 AS Column4
FROM Table2 M
WHERE
M.Column3 IS NULL AND M.Column4 = R.Column4
GROUP BY Column4) `
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我遇到这种情况时,是因为我未完成交易。在测试过程中,我一直在使用 SQL Developer 重置目标表中的列值。 (默认情况下,SQL Developer 不使用隐式事务。)
详细信息如下:
SSIS PL/SQL 任务挂起,并显示消息“多步 OLE DB 操作生成错误。”
When this happened to me, it was because I had left a transaction open. I had been using SQL Developer to reset column values in the target table during testing. (SQL Developer doesn't use implicit transactions by default.)
Here's the detail:
SSIS PL/SQL task hangs with message “Multiple-step OLE DB operation generated errors.”