Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: [Q] java insert data to database and auto commit?
By default, JDBC will issue a commit after every successful operation. You can change that default rather easily in the program, however, so you might check there.
If the Java application's database connection were broken, Oracle would rollback any uncommitted changes. If the application was in autocommit mode, however, that would only rollback the current statement execution.
My first hunch is that someone turned off autocommit on the database. My next hunch is that an error is thrown when the statement is executed and the Java application is catching and ignoring the error.
Justin Cave
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC
-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of dba1 mcc
Sent: Thursday, March 18, 2004 1:07 PM
To: oracle-l_at_freelists.org
Subject: [Q] java insert data to database and auto commit?
We have ORACLE 9iR2 on SUN server and 9iR2 application server on NT. Our developer compaint they insert lots of data from java through JDBC and 9iR2 application server to ORACLE database. after finish, they check table and NO data in it. They point finger to DB redo log or undo tablespace is wrong. I checked alert.log and there is NO error message.
The developer said "java is autocommit on execute query". My questions are:
Thanks.
![]() |
![]() |