ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 限制用户对自己对象的DDL权限

限制用户对自己对象的DDL权限

原创 Linux操作系统 作者:hxhy 时间:2019-04-04 21:57:05 0 删除 编辑

限制用户对自己对象的DDL权限 (触发器实现)


create or replace trigger ddl_refuse_trig
before ddl on schema
declare
v_ipaddress varchar2(20);
begin
select sys_context('userenv','ip_address') into v_ipaddress from dual;
if v_ipaddress <> '192.168.1.152' then
raise_application_error(-20099,'Sorry,You can not execute the command.Please contact the DBA',false);
end if;
end;
/

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/50509/viewspace-174264/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2003-06-28

  • 博文量
    27
  • 访问量
    25525