I have a procedure which drops and recreates a table. When a test is run against the procedure the Code Tester package becomes invalidated and th following error occurs:
ORA-04068: existing state of packages has been discarded
Sample procedure:
CREATE OR REPLACE PROCEDURE qctod#update_test2 (
col1_id_in IN PLS_INTEGER
, col2_in IN NUMBER
)
IS
BEGIN
If col1_id_in=0 then
execute immediate 'drop table test2';
execute immediate ' CREATE TABLE test2 (col1 number, col2 number) ';
insert into test2 values(0,0);
commit;
end if;
If col1_id_in=0 then
UPDATE test2
SET col2 = col2-1;
else
UPDATE test2
SET col2 = col2_in
WHERE col1 = col1_id_in;
end if;
END qctod#update_test2;
/
You need to be signed in and under a current maintenance contract to view premium knowledge articles.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center