cancel
Showing results for 
Search instead for 
Did you mean: 

no autocommit

matthias_prller
Participant
0 Kudos

Hi,

I read something about this topic some weeks before, but can somebody confirm this:

oracle-jdbc driver has by default autocommit on.

And I have no chance to turn it off without programming a custom action?

(I don't like custom actions but I want to set autocommit off)

Thanks

Matthias

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

There is no way to set the auto commit off in SQL Queries.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello, Matthias.

You'll need custom action(s) in order to do database transactioning across multiple actions in a transaction. This is primarily due to the fact that:

1) You cannot turn off autocommit

2) You cannot be guaranteed that multiple SQLQuery actions will use the same database connection

The best approach is to design custom action(s) similar to the transactional JCO action(s) - one to initiate the connection/transaction, one to execute SQL calls, one to do a rollback, and one to do a commit. The actions also need to be "linked" in such a way that the connection is shared - the JCO actions provide such a pattern.

It would actually be fairly trivial to do the actual code, but the complexity of the "linked actions" can be a bit challenging. Maybe I'll write a set of these actions or "pseudocode" them so that someone else can write them - as long as whoever writes them agrees to "open source" them.

Rick

matthias_prller
Participant
0 Kudos

Hello Rick,

oh, I thought it is just an action block and set autocommit to false.

Your solution sounds a bit more complicated. I'm not very familiar with java so I think I'm not the right person for this job. But I'm interested in the solution if someone will create the custom actions.

Thanks for your help.

Matthias

0 Kudos

Matthias,

The work is already done for v12.1...

[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10bfa608-103b-2c10-6399-e41044c3363e|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10bfa608-103b-2c10-6399-e41044c3363e]

Other custom solutions can be found here:

[https://wiki.sdn.sap.com/wiki/display/xMII/Customization|https://wiki.sdn.sap.com/wiki/display/xMII/Customization]

Regards,

Sam

Former Member
0 Kudos

It's probably not what you are looking for, but you can handle the commits in the SQL Query itself using Rollbacks and the like.