create or replace trigger trig_control
before drop or truncate or rename or create or alter on database
begin
if upper(ORA_LOGIN_USER) not in ('SYSTEM','SYS') then --ORA_LOGIN_USER 触发器所在的用户名
if ora_dict_obj_type!='SEQUENCE' then --sequence的操作不控制
raise_application_error(-20001,'该操作被禁止!修改数据库结构,请提供脚本给组长处理' );
end if;
end if;
before drop or truncate or rename or create or alter on database
begin
if upper(ORA_LOGIN_USER) not in ('SYSTEM','SYS') then --ORA_LOGIN_USER 触发器所在的用户名
if ora_dict_obj_type!='SEQUENCE' then --sequence的操作不控制
raise_application_error(-20001,'该操作被禁止!修改数据库结构,请提供脚本给组长处理' );
end if;
end if;
end;
控制不同的东西 参考:https://blog.csdn.net/u013882957/article/details/71305347