Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006

    Unanswered: Best way to handle all erros and get performance(OCI)?

    Hi there,

    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.

    ((OraclePreparedStatement)globalStmt).setExecuteBa tch(commit);

    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.

    ((OraclePreparedStatement)globalStmt).executeUpdat e();

    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.

  2. #2
    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
    You can alter their status prior to your data upload to non deferred, although this can bring other related problems.

    Deferred constraints won't raise integrity errors until the data is commited.

    Please 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts