Reputation: 337
I "accidentaly" created a trigger that will not allow anyone to perform DDL on database. Now I can't do anything with my database. Not even sysdba can drop this trigger. I tried disabling it, but still, it triggers before doing so. Here is the evil trigger I enabled:
CREATE OR REPLACE TRIGGER Prevent_Changes
BEFORE DDL ON DATABASE
BEGIN
RAISE_APPLICATION_ERROR (
num => -20000,
msg => 'ERROR, no changes to database allowed!');
END;
Upvotes: 1
Views: 327
Reputation: 594
Just edit the trigger first. Remove this part.
RAISE_APPLICATION_ERROR (
num => -20000,
msg => 'ERROR, no changes to database allowed!');
You may just add:
dbms_output.put_line('fine');
This will stop raising the exception on your any ddl. It should work.
Upvotes: 2