SSIS ERROR-The transaction operation cannot be performed because there are pending requests working on this transaction

我们两清 提交于 2019-12-13 16:36:22

问题


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."

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

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.

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

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.


回答1:


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

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

kill 99

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.

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.



来源:https://stackoverflow.com/questions/26235105/ssis-error-the-transaction-operation-cannot-be-performed-because-there-are-pendi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!