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!