Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> problem with database level trigger
there is a database level trigger which prevents from accidentally
modifying view/functions/procedures:
CREATE OR REPLACE TRIGGER DDLProtection
BEFORE
TRUNCATE or RENAME or DROP or ALTER
ON DATABASE
BEGIN
if some conditions here
raise_application_error(-20001, 'Insufficient privileges for the operation');
end if;
end if;
END;
the problem is that somehow it is in invalid state
any attempt to DO ANYTHING WITH IT it results in an error:
ALTER TRIGGER AAA.DDLProtection COMPILE
ORA-04098: trigger 'AAA.DDLPROTECTION' is invalid and failed re-val
ALTER TRIGGER AAA.DDLProtection DISABLE
ORA-04098: trigger 'AAA.DDLPROTECTION' is invalid and failed re-val
DROP TRIGGER AAA.DDLProtection
ORA-04098: trigger 'AAA.DDLPROTECTION' is invalid and failed re-val
using a system account has not helped
Looks like catch-22 to me: as soon as the trigger is invalid, no DDL can ever be changed
Any suggestions?
TIA
Received on Mon Oct 18 2004 - 17:16:37 CDT
![]() |
![]() |