Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Commit & Rollback

526039Jul 7 2007 — edited Jul 7 2007
Hi All,

I'm not sure if the Oracle forums are the best place for this question, but here goes.

From a Java application, we execute Select & DML statements. We open connection, turn autocommit to false ONLY when using any DML statements, begin transactions, if all are successful, commit, if not rollback, then in either case close connection.

Another developer was implementing the transaction/commit/rollback process even for pure select statements. I just want to confirm that we do not require anything special for select statements, just open connection, process resultset, & close resultset & connection. Also, I'm not sure if we are doing this, I need to check out code, but once we commit or rollback, should we turn autocommit back to true?

Reason for need of confirmation, I was informed that database degradation can occur if the autocommit is false & we forget to commit or rollback any transactions. I just want to ensure that we are using this feature properly.

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 4 2007
Added on Jul 7 2007
4 comments
481 views