Skip to main content
Question

MS SQL BEGIN and END Transaction


sigtill
Supporter
Forum|alt.badge.img+24
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

2 replies

  • 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
pakicetus wrote:

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!

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings