Huge Batch execution through the java application into the oracle DB [message #677252] |
Fri, 06 September 2019 07:54 |
|
revathitirun
Messages: 16 Registered: May 2011
|
Junior Member |
|
|
Hi All,
When we are trying to insert the batch (collection records of ), through the java program into the oracle Database its working differently.
If the collection count is less than or equals to 65536 all required records are inserting to the table.
But when that collection size is more than the 65536, we are missing those 65536 records.
Inserted record count is always equal to the actual count - 65536
Example 1:
Collection count = 5000 - working fine & All Records inserted & application was running successfully.
Example 2:
Collection count = 65536 - Not working fine - ZERO Records inserted & application was running successfully.
Example 3:
Collection count = n* 65536 - Not working fine - ZERO Records inserted & application was running successfully.
Example 4:
Collection count = 65540 - Not working fine - FOUR(65540-65536) Records inserted & application was running successfully.
Example 4:
Collection count = M+(N*65540) - Not working fine - M Records inserted & application was running successfully.
Following is code snippet which we are executing through Java:
[9/6/2019 12:09 PM] Anumula, Rajesh [ICG-IT NE]:
pStatement = dbConnection
.prepareStatement("INSERT INTO temp_table1 (BRANCH,SEQNO) VALUES(?,?)");
for(long i =1;i<=70000;i++) {
pStatement.setString(1, "XYZ");
pStatement.setLong(2, i);
pStatement.addBatch();
System.out.println(i);
}
int count[]=pStatement.executeBatch();
Following are version of our software
Oracle :Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
Java :1.8
JDBC : 4.3.22.RELEASE
Please help me to understand the problem.Is the Issue is with Java or Oracle ?
Thanks
Revathi.T
|
|
|
|
|
|
|
|