PLS-00801: internal error [*** ASSERT at file pdw4.c, line 589;
Date: Thu, 4 Dec 2008 08:59:23 -0800 (PST)
Message-ID: <b94cc6fa-ceaa-40cf-9ec4-14315d312622@t2g2000yqm.googlegroups.com>
Hi all,
The database this is occuring on is Release 10.2.0.3.0.
Compiling the procedure below is producing the error
LINE/COL ERROR -------- ----------------------------------------------------------------- 18/42 PLS-00801: internal error [*** ASSERT at file pdw4.c, line 589; Unknown expression Expr = 283.; DISABLE_CONSTRAINTS_PRC__LCR_DEV2__P__211999[18, 4]
As far as I can tell it should be able to alter constraints using EXECUTE IMMEDIATE. Does the use of a table complicate things?
Thanks.
CREATE OR REPLACE PROCEDURE Disable_Constraints_prc
IS
TYPE ddl_tab IS TABLE OF VARCHAR2(2000) INDEX BY pls_integer;
t_ddl ddl_tab;
CURSOR c_consts_to_dis
IS
select 'ALTER TABLE '||substr(c.table_name,1,35)||' DISABLE
CONSTRAINT '||constraint_name||';'
from user_constraints c, user_tables u
where c.table_name = u.table_name;
BEGIN
OPEN c_consts_to_dis;
FETCH c_consts_to_dis
BULK COLLECT INTO t_ddl;
CLOSE c_consts_to_dis;
FORALL i IN t_ddl.first .. t_ddl.last EXECUTE IMMEDIATE t_ddl(i);
t_ddl.delete;
EXCEPTION
WHEN OTHERS
THEN
IF c_consts_to_dis%ISOPEN THEN
CLOSE c_consts_to_dis;
END IF;
RAISE;
END;
Received on Thu Dec 04 2008 - 10:59:23 CST