Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: [Q] java insert data to database and auto commit?

RE: [Q] java insert data to database and auto commit?

From: Justin Cave (DDBC) <jcave_at_ddbcinc.com>
Date: Thu, 18 Mar 2004 14:05:40 -0700
Message-ID: <87E9F113CEF1D211A4C3009027301874272D9F@ddbcinc.ddbc.local>


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:

  1. does anyone know how java auto commit work? Does it commit after evry insert or after 100 insert?
  2. if java connection broke, will oracle rollbak those insert data?
  3. any ideal why data gone?

Thanks.



Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com

Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html


Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Thu Mar 18 2004 - 15:31:31 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US