ORA-01086 savepoint 'string' never established
335318Aug 22 2003 — edited Aug 22 2003Hi there,
Running a rather complex PL/SQL procedure, I got this message (with other soft exceptions). the savepoint was declared before. Do you have any ideas/tips to solve this problem?
Below you can find the piece of code with the error.
Thanks,
Rafael
BEGIN
SAVEPOINT case_savepoint;
LOOP
FETCH ocadata_cursor INTO ocadata_record;
EXIT WHEN ocadata_cursor%NOTFOUND;
BEGIN
IF ocadata_record.record_type = 'RC' THEN
IF ocadata_record.field1 < 0 THEN
RAISE my_exception;
END IF;
PROCESS_OCA_INPUT_DATA_RC (ocadata_record,l_sysdate);
ELSIF ocadata_record.record_type = 'ES' THEN
IF ocadata_record.field2 < 0 THEN
RAISE my_exception;
END IF;
PROCESS_OCA_INPUT_DATA_ES(ocadata_record,l_sysdate);
ELSIF ocadata_record.record_type = 'LT' THEN
l_counter := l_counter +1;
IF ocadata_record.field2 < 0 THEN
RAISE my_exception;
END IF;
l_current_LT_field3 := TO_DATE(ocadata_record.field3,'DD/MM/YYYY');
IF l_previous_LT_field3 > l_current_LT_field3 THEN
RAISE my_exception_LT;
END IF;
l_previous_LT_field3 := l_current_LT_field3;
IF l_counter <= 1 THEN
PROCESS_OCA_INPUT_DATA_LT_ONE(ocadata_record,l_sysdate,l_exception_LT4);
PROCESS_OCA_INPUT_DATA_LT_DET(ocadata_record,l_sysdate);
ELSE
PROCESS_OCA_INPUT_DATA_LT_DET(ocadata_record,l_sysdate);
END IF;
ELSIF ocadata_record.record_type = 'NC' THEN
PROCESS_OCA_INPUT_DATA_NC(ocadata_record,l_sysdate);
END IF;
EXCEPTION
WHEN my_exception THEN
RAISE;
-- LT
WHEN my_exception_LT THEN
errcode := 'IBS0530591';
RAISE;
-- LT4
WHEN my_exception_LT4 THEN
errcode := 'IBS0530592';
RAISE;
WHEN OTHERS THEN
errcode := 'IBS0530593';
RAISE;
END;
END LOOP;
CLOSE ocadata_cursor; -- RAFA
EXCEPTION
WHEN my_exception OR my_exception_LT OR my_exception_LT4 THEN
ROLLBACK TO SAVEPOINT case_savepoint;
WHEN OTHERS THEN
ROLLBACK TO SAVEPOINT case_savepoint;
errcode := 'IBS0530596';
END;