Skip to Main Content

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Reji.

Asked: July 14, 2000 - 5:01 pm UTC

Last updated: November 18, 2005 - 3:12 pm UTC

Version: 8.1.6

Viewed 1000+ times

You Asked

Tom:
I have a JDBC application and I set the autocommit to false
and doing lot of inserts and do a commit. Is this feature
guarantees that if I do a rollback after a very large number
of inserts will rollback all my inserts. Or what are the
other parameters ( like size of redolog file etc..) involved
in this decision?


TIA
Reji


and Tom said...

Turning autocommit off ( a silly design "feature" of the jdbc standard -- having autocommit on, sorts of removes the "transaction" from the database) will ensure that all work you perform up until you commit is able to be rolled back if you rollback.

Redolog sizing is important for performance but will not hinder you in this respect.

Rollback segment sizing is perhaps more important. You need to ensure they are large enough to hold your rollback information.

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Commit after select?

mark, November 18, 2005 - 7:33 am UTC

Is JDBC commiting after select statement? Could that cause a lot of log_file_sync wait on the database?

Tom Kyte
November 18, 2005 - 3:12 pm UTC

not in the 9i drivers and above, does not appear to. even so, they would be "rd_only" marked (no-ops really).