您好,欢迎访问一九零五行业门户网

Oracle数据库审计概述

针对sysdba的审计,oracle提供了三种技术:1、数据库审计用户的使用的特权,执行的命令和访问的表,以及登录状态2、使用数据库触
针对sysdba的审计,,oracle提供了三种技术:
1、数据库审计用户的使用的特权,执行的命令和访问的表,以及登录状态
2、使用数据库触发器对发起基于值的审计;
3、细粒度审计可以追踪到对表中哪些行进行了访问;
当初始化参数文件audit_sys_operations被设置为true时,sysdba和sysoper执行的语句将被记录到操作系统的审计文件中;
标准审计
在进行数据库审计前 audit_trail初始化参数文件需要被设置:
none:不执行审计 os:审计文件被写入到操作系统中——the application log on windws, or the audit_file_dest directory on uinx db:审计文件被写入到数据库的数据字典表中:sys.aud$ db_extended xml xml_exxtended例:
audit create any trigger; --审计所有创建触发器的操作
auditselect any table by session;
audit insert on scott.emp whenever successful;--还有一个选项是whenever not successful;
audit allon scott.emp;
audit session whenever not successful;--对用户登录进行审计; 
--查看系统产生的审计信息
select * fromdba_audit_trail;
其他产生的审计信息的视图还包括:
dba_audit_object,dba_audit_statement, dba_audit_session
使用触发器来对值进行审计
a database trigger is a block of pl/sql code that wil runautomaitcally whenever in insert, update, or delete is executed against a table.
例:
create orreplace trigger system.creditrating_audit
afterupdat of creditrating
on scott.customers
referencingnew as new old as old
for eachrow
begin
if :old.creditrationg!= :new.creditrating then
insert into system.creditrating_audit
values(sys_context('userenv','os_user'),
sys_context('userenv','ip_address'),
:new.customer_id || 'credit rating changed from' || :old.creditrating ||' to ' || :new.creditrating);
end if;
end;
/
细粒度审计fine-grained auditing(fga)
fga isconfigured with the package dbms_fga
sql>execute dbms_fga.add_policy(-
object_schema=>'hr',-
object_name=>'employees',-
policy_name=>'pol1',-
audit_condition=>'department_id=80',-
audit_column=>'salary');
dba_audit_trialis used for standard database auditing;
dba_fga_audit_trail:is used for fine-grained auditing;
dba_common_audit_trail:is used for both;
to seethe results of auditing with triggers, you must create your own views thataddress your own tables;
其它类似信息

推荐信息