SSIS 错误

编程入门 行业动态 更新时间:2024-10-25 04:15:10
本文介绍了SSIS 错误-无法执行事务操作,因为有处理此事务的待处理请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在执行 ssis 包时,我收到以下错误:无法执行交易操作,因为有处理此交易的待处理请求."

While executing an ssis package,I am getting the below error: "The transaction operation cannot be performed because there are pending requests working on this transaction."

ssis 包有 4 个并行运行的执行 sql 任务.连接是 ADO.Net.

The ssis package has 4 execute sql tasks that run parallel. The connection is ADO.Net.

execute sql 任务调用具有事务、回滚和提交的过程,执行 1 或 2 执行 sql 任务失败,其余成功.

The execute sql tasks calls a procedure which has transaction,rollback and commit, On execution 1 or 2 execute sql tasks fail and remaining succeeds.

另外,当任何一个sql任务失败时,其他执行sql任务的数据也会回滚.

Also, On failure of any of the sql tasks, data of other execute sql tasks also rollbacks.

我希望这些execute sql任务相互独立运行.数据应该只回滚到具有并行运行的任务的所有记录而不是所有记录的任务.

I want these execute sql tasks to run independent of each other.The data should be rolled back only for the tasks that have instead of all the records of the tasks running in parallel.

推荐答案

您可能遇到了需要终止的死锁.您可以通过进入 sql server management studio 并运行以下命令来查看:

You may have a deadlock that needs to be killed. You can see this by going into sql server management studio and running the following:

SELECT * FROM SYSPROCESSES where blocked > 0

然后,如果这样做是安全的,则通过其 ID 终止进程,例如

Then if it is safe to do so, kill the process by its ID e.g.

杀死99

如果这是夜间 ETL 过程的一部分,您可能需要考虑在 SQL 代理中创建 4 个不同的作业步骤,并在夜间的不同时间执行它们.这可能会解决您遇到的问题.

If this is part of a nightly ETL process, you may want to consider creating 4 different job steps in SQL Agent and executing them at different times during the night. This will possibly get around the issues you are having.

否则,如果执行 SQL 任务需要在同一个包中运行,您将需要检查它们的运行顺序.例如.运行首先执行 sql 任务,然后移动到下一个 - 例如将序列容器添加到您的控制流中,以确保第一个执行 sql 任务在下一个运行之前完成.

Otherwise, if the execute SQL tasks need to be run in the same package, you will want to check the order they are run in. e.g. run first execute sql task, then move onto the next one - e.g. add a sequence container to your control flow to make sure the first execute sql task is finished before the next is run.

更多推荐

SSIS 错误

本文发布于:2023-11-09 20:23:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573343.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   SSIS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!