Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-24373

694243Mar 24 2010 — edited Mar 24 2010
Hello.

I have a lot of SQL statements (like 2-3 Mio) - plain inserts, deletes and updates. In a previous post, I asked how to embed exceptions for the statements:
4163808

Here is the solution and this is how my script looks like now (with only 7 statements in 3 blocks out of these millions of statements):
BEGIN
  BEGIN
     DELETE ...
     COMMIT;
  EXCEPTION
     WHEN OTHERS THEN
         dbms_output.put_line(sqlerrm);
        ROLLBACK;
        raise;
  END;
   
  BEGIN
    INSERT ...
    INSERT ...
    INSERT ...
    COMMIT;
  EXCEPTION
     WHEN OTHERS THEN
        dbms_output.put_line(sqlerrm);
        ROLLBACK;
        raise;
  END;
   
  BEGIN
     INSERT ...
     UPDATE ...
     COMMIT;
  EXCEPTION
     WHEN OTHERS THEN
       dbms_output.put_line(sqlerrm);
        ROLLBACK;
       raise;
  END;      
END;      
/
So it seems, that for oracle this is only one very big statement (the .sql file is over 1 GB big) and oracle tries at first to parse everything. In my case - obviously unsuccessful, because I received the ORA-24373: invalid length specified for statement. So my question is - what is the max length of a statement? Is there a work-around for this issue?

Thanks a lot!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 21 2010
Added on Mar 24 2010
7 comments
3,770 views