Oracle从Oracle8i开始,允许实施DDL事件trigger,可是实现对于DDL的监视及控制,以下是一个进一步的例子:create or replace trigger ddl_denybefore create or alter or drop or truncate on databasedeclare  l_errmsg varchar2(100):= 'You have no permission to this operation';begin  if ora_sysevent = 'CREATE' then     raise_application_error(-20001, ora_dict_obj_owner || '.' || ora_dict_obj_name || ' ' || l_errmsg);  elsif ora_sysevent = 'ALTER' then    raise_application_error(-20001, ora_dict_obj_owner || '.' || ora_dict_obj_name || ' ' || l_errmsg);  elsif ora_sysevent = 'DROP' then    raise_application_error(-20001, ora_dict_obj_owner || '.' || ora_dict_obj_name || ' ' || l_errmsg);  elsif ora_sysevent = 'TRUNCATE' then    raise_application_error(-20001, ora_dict_obj_owner || '.' || ora_dict_obj_name || ' ' || l_errmsg);  end if;exception  when no_data_found then    null;end;/
09-07 17:35