Home > database >  Built under the Scott user DDL triggers, unable to delete?
Built under the Scott user DDL triggers, unable to delete?

Time:09-16

Oracle triggers, small white one, just study under the Scott user built a trigger, called scott_trigger code is as follows:

The CREATE OR REPLACE the TRIGGER scott_trigger
BEFORE the DDL
ON the SCHEMA
The BEGIN
Not allowed Scott user RAISE_APPLICATION_ERROR (- 20005, 'DDL commands operation! ');
END;

Because the trigger to ban all Scott user DDL commands operation, cause I can't delete or disable the trigger, is there a solution which the teacher, in this thank you very much!

CodePudding user response:

Disable the trigger:

Alter the trigger scott_trigger disable.

CodePudding user response:

 
- the original poster is which version of the library,


SQL>
SQL> The CREATE OR REPLACE the TRIGGER scott_trigger
2 BEFORE the DDL
3 ON the SCHEMA
4 the BEGIN
5 RAISE_APPLICATION_ERROR (- 20005, "no Scott users all DDL commands operation! ');
6 the END;
7/
The Trigger created
SQL> Create table test (int id, name varchar (10));
Create table test (int id, name varchar (10))
ORA - 00604: recursive SQL error level 1
ORA - 20005: ban all Scott user DDL commands operation!
ORA - 06512: in line 2
SQL> Drop the trigger scott_trigger;
The Trigger dropped
SQL> Create table test (int id, name varchar (10));
The Table created
SQL> Drop table test purge;
Table dropped

SQL>

  • Related