Skip to main content
Question

MS SQL BEGIN and END Transaction

  • May 20, 2015
  • 2 replies
  • 75 views

sigtill
Supporter
Forum|alt.badge.img+25
Is it possible to BEGIN a transaction when an SQLExectur gets run, and keep the transaction untill all writers have successfully committed? I know it is possible to set on the reader - however I am not sure if you can set the whole workspace as a transaction
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

  • 1 reply
  • October 17, 2019

I have no answer... this is precisely what I need an answer to! If one cannot do this, then it would seem that FME could leave the target database in an inconsistent state, if, say, the network twerked in the middle of a process. Workspace spanning transactions would seem like a really good thing. Or maybe apply the transaction to a subset of the process that deals with a single database instance.

 

 

My use case: I need to call a stored procedure that has to be within a transaction. Once I have a return value from that stored procedure, one of two possible paths of execution occur within the confines of that transaction. Regardless of the path, if there is an error, everything should be rolled back. How to do that?

 

 

 


jovitaatsafe
Safer
Forum|alt.badge.img+11
  • Safer
  • 635 replies
  • October 21, 2019

I have no answer... this is precisely what I need an answer to! If one cannot do this, then it would seem that FME could leave the target database in an inconsistent state, if, say, the network twerked in the middle of a process. Workspace spanning transactions would seem like a really good thing. Or maybe apply the transaction to a subset of the process that deals with a single database instance.

 

 

My use case: I need to call a stored procedure that has to be within a transaction. Once I have a return value from that stored procedure, one of two possible paths of execution occur within the confines of that transaction. Regardless of the path, if there is an error, everything should be rolled back. How to do that?

 

 

 

Hi @pakicetus,

Thanks for your question! I see that the original question is from quite a few years ago. Would you be open to posting a new question and linking it to here for context? This will increase visibility on your question and encourage more helpful responses.

 

 

While I'm not personally a databases expert, I think this article on Executing a Stored Procedure on Microsoft SQL Server with FME might be your best resource in the meantime. Hope that helps a bit!