Oracle审计详解

2014-11-24 17:57:33 · 作者: · 浏览: 6

audit_file_dest
audit_sys_operations
audit_trail


audit_sys_operations:
默认为false,当设置为true时,所有sys用户(包括以sysdba,sysoper身份登录的用户)的操作都会被记录,audit trail不会写在aud$表中,这个很好理解,如果数据库还未启动aud$不可用,那么像conn /as sysdba这样的连接信息,只能记录在其它地方。如果是windows平台,audti trail会记录在windows的事件管理中,如果是linux/unix平台则会记录在audit_file_dest参数指定的文件中。

audit_trail:
None:是默认值,不做审计;
DB:将audit trail 记录在数据库的审计相关表中,如aud$,审计的结果只有连接信息;
DB,Extended:这样审计结果里面除了连接信息还包含了当时执行的具体语句;
OS:将audit trail 记录在操作系统文件中,文件名由audit_file_dest参数指定;
XML:10g里新增的。

10g Values:

none

Disables database auditing.

os

Enables database auditing and directs all audit records to the operating system's audit trail.

db

Enables database auditing and directs all audit records to the database audit trail (the SYS.AUD$ table).

db_extended

Enables database auditing and directs all audit records to the database audit trail (the SYS.AUD$ table). In addition, populates the SQLBIND and SQLTEXT CLOB columns of the SYS.AUD$ table.

xml

Enables database auditing and writes all audit records to XML format OS files.

xml,extended

Enables database auditing and prints all columns of the audit trail, including SqlText and SqlBind values.

注:参数AUDIT_TRAIL不是动态的,为了使AUDIT_TRAIL参数中的改动生效,必须关闭数据库并重新启动。在对SYS.AUD$表进行审计时,应该注意监控该表的大小,以避免影响SYS表空间中其他对象的空间需求。推荐周期性归档SYS.AUD$中的行,并且截取该表。Oracle提供了角色 DELETE_CATALOG_ROLE,和批处理作业中的特殊账户一起使用,用于归档和截取审计表。

audit_file_dest:Audit_trail=OS时 文件位置