• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ORA-03113 error

 
Jen Yang
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have 2 connections to the same database. And I created 2 statements based on these 2 connections to modify 2 different tables one after another repeatedly. Something like this:
Statement stmt1 = connection1.createStatement();
Statement stmt2 = conneciton2.createStatement();
for (i=0; i<count; i+=) {
stmt1.executeUpdate("insert into table1 values(1,2)");
stmt2.executeUpdate("update table2 set field1=3, field2=4");
}
I get this exception intermittently:
ORA-03113: end-of-file on communication channel
Does anybody know what caused this problem? Any workaround? Thanks a lot.
 
Nehul NN
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a suggestion..
when you are executing executeUpdate() in for loop.. instead of the use batch process.. meaning create your all insert sql statement as string..e.g.
String [] insert = new String[100]; // you know number of records you want to insert from your program
for (i=0; i< count;i++){

insert[i] = "insert into ....";
}
stmt.executeBatch();
that way you will save lot of value time in inserting & update every single statement.
But your current JDBC driver must support this feature.
--I forgot the file name but here is want I know at Oracle side..
At Oracle side make sure you have created name in listener.ora or tns.ora [file are in network directory where you have install oracle]
 
Wayne L Johnson
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a lot of information about this bug on the net. Try this link: End of Communication Channel or this: Oracle search for 03113.
There were some suggestions that this might be tied to the rollback segment getting filled. If your database isn't designed with auto-commit turned on, then you might want to commit the insert and update inside the loop to make sure your actions are committed. If there is a relation between the number of times you go through the loop and when the problem occurs, this might solve it.
[ November 05, 2003: Message edited by: Wayne L Johnson ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic