aspose file tools*
The moose likes JDBC and the fly likes Batch Execution Solution Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Batch Execution Solution" Watch "Batch Execution Solution" New topic
Author

Batch Execution Solution

Sant Manchala
Greenhorn

Joined: Apr 15, 2009
Posts: 6

Issue:

1)If we try to execute 5000 statements using java batch update by preparedstatements on oracle database , is there any chance to track the statement which has issues while executing that batch update

below code adds all the insert statements into prepared statement and executes the batch once the count reaches 5000 count

this the code i was using

ps.addBatch();
batchCtr++;

if(batchCtr >= 5000){

int[] count= ps.executeBatch();
log.info("Executed the count using batch"+count.length+"projectnumber--"+str);
batchCtr = 0;
}



santosh manchala
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19720
    
  20

Hi,

Please read your private messages regarding an important announcement.

Thank you,

Rob

Also, please Use Code Tags.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874



This might give some idea.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Batch Execution Solution