码迷,mamicode.com
首页 > 数据库 > 详细

Oracle审计策略例子

时间:2018-10-10 12:02:57      阅读:228      评论:0      收藏:0      [点我收藏+]

标签:初始   pts   通过   employee   rom   系统权限   begin   sel   记录   

首先确保Oracle初始化参数audit_trail值为DB或OS,通过“show parameter audit_trail;”查看。

1 语句审计

audit table by test by access;

select * from dba_stmt_audit_opts; --查看是否创建语句审计成功

select * from employee_log;

delete from employee_log where l_date =‘2018-09-27 16:15:43‘;

select * from dba_audit_trail;  --查看审计记录

2 对象审计

audit delete on test.employee_log by access;

select * from dba_obj_audit_opts;  --查看是否创建对象审计成功

select * from employee_log;

delete from employee_log where l_date =‘2018-09-27 16:15:43‘;

select * from dba_audit_trail;  --查看审计记录

3 权限审计

audit select any table;--创建权限审计

--确保当前用户有select any table系统权限

select * from dba_priv_audit_opts;--查看是否创建权限审计成功

select * from employee_log;

select * from dba_audit_trail;  ---查看审计记录

4 精细审计

begin 

dbms_fga.add_policy(

object_schema=>‘test‘,

object_name=>‘employee_log‘,

policy_name=>‘fga_test‘,

audit_column=>‘l_date‘,

enable=>true,

statement_types=>‘select‘

);

end;   ---创建精细审计

 

select * from dba_audit_policies; --查看是否创建精细审计成功

select * from employee_log where l_date =‘2018-09-27 16:15:43‘;

select * from dba_fga_audit_trail;--查看精细审计记录

select * from employee_log;

select * from dba_fga_audit_trail;

 

Oracle审计策略例子

标签:初始   pts   通过   employee   rom   系统权限   begin   sel   记录   

原文地址:https://www.cnblogs.com/ray-bk/p/9765339.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!