Chinaunix首页 | 论坛 | 博客
  • 博客访问: 91766974
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: Oracle

2008-03-31 12:41:15

来源:赛迪网    作者:战国锋

问题:如何才能限制用户对自己对象的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;
/
阅读(278) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~