DDL触发器(用来控制用户的DDL行为)

DDL触发器

禁止scott用户的所有DDL操作

create or replace trigger scott_forbid_trigger

before ddl

on schema

begin

   raise_application_error(-20007,'scott can not ddl,please connect to dba');

end;

/

create view testview as select * from emp;

ORA-00604: 递归 SQL 级别 1 出现错误

ORA-20007: scott can not ddl

ORA-06512: 在 line 2

原文地址:https://www.cnblogs.com/kawashibara/p/9047653.html