01-16-06, 13:29 #1Registered User
- Join Date
- Jan 2006
Unanswered: Best way to handle all erros and get performance(OCI)?
Im using Oracle Call Interface (for Java) to execute batch file process. But I have got a problem.
I set ExecuteBatch with the same number of commit time, i.e: 100, 1000 or just 10, for thats ok.
And I handle executeUpdate to catch all SQL Exceptions. I made some proposital files with invalid erros but when I handle "executeUpdate" it´s doesn´t get the corrent error line, and puts out another line that is corret.
Check in the code I concluded that its always get the same sequence of commit number like the error line. For example, I have between line 1 - 50 a line error, this line is 31, but I set the commit time for 50, its show me that line errror is 50 wherever 31. But if I put setExecuteBatch with '1' so it can handle corret lines erros, but the system performance bring down. What is the best way to handle all erros and keep the perfronace?
Sorry for my english, I am not native. Thanks all.
01-18-06, 06:48 #2Drunkard
- Join Date
- Nov 2002
- Desk, slightly south of keyboard
Are your errors constraint errors? If so can you check to see whether they are deferred?
select constraint_name, deferrable, deferred from user_constraints
SET CONSTRAINT <cons_name> IMMEDIATE
BillPlease don't email me directly with questions. I've probably just got home from the pub and cannot guarantee the sanity of my answers. In fact, I can't believe I actually made it home.