viernes, 13 de febrero de 2009

Restrict DDL on a Schema

Restrict DDL on a Schema

SQL> conn faruk/farukConnected.

SQL> create table before_trigger(a number);Table created.

SQL>conn system/aConnected.

SQL> CREATE OR REPLACE
2 TRIGGER BEFORE_DDL_FARUK
3 BEFORE DDL
4 ON FARUK.SCHEMA
5 BEGIN
6 RAISE_APPLICATION_ERROR(-30900,'DDL Operation is not Permitted.' );
7 END;
8 /Trigger created.

SQL> conn faruk/farukConnected.

SQL> create table after_trigger(a number);
create table after_trigger(a number)

*

ERROR at line 1:ORA-00604: error occurred at recursive SQL level 1ORA-21000: error number argument to raise_application_error of -30900 is out ofrangeORA-06512: at line 2