OCP-052考试题库汇总(41)-CUUG内部解答版

Examine this session output:

SQL> connect scott/tiger

Connected.

SQL>select name,value

2 from v$parameter

3 where name='audit_trail';

NAME VALUE


audit_trail DB

SQL> audit all on emp;

Audit succeeded.

Which two will generate on audit record?

A)every update statement executed by scott that updates scott.emp

B)every ddl statement executed by scott that affects scott.emp

C)any dml statement executed by sys on scott.emp

D)only the first select statement executed by scott in a session on scott.emp

E)every update statement executed by scott that updates hr.emp

F)only the first dml statement executed by system in a session on scott.emp

Answer: AB

赵:C 错,在精细审计 FGA 的情况下,不记录 sys 的操作。

AUDIT_TRAIL = { none | os | db | db,extended | xml | xml,extended }

参数详解:

AUDIT_TRAIL 启用或禁用数据库审计。当设置该参数为 NONE 或 FALSE 时,将禁止数据库审计;当设置该参数为 OS 时,将激活数据库审计,并将审计记录写入到 OS 审计跟踪文件中;当设置该参数为DB 或 TRUE 时,将激活数据库审计,并将审计记录写入到数据字典 SYS.AUD$中;当设置该参数为DB_EXTENDED 时,不仅将审计记录写入到数据字典 SYS.AUD$中,还会填充该数据字典的 SQLBIND 和SQLTEXT 列。

取值说明:

none 禁用数据库审计

os 启用数据库审计,并将数据库审计记录写入到操作系统审计记录

db 启用数据库审计,并将数据库所有审计记录写入到数据库的 SYS.AUD$表

db,extended 启用数据库审计,并将数据库所有审计记录写入到数据库的 SYS.AUD$表。另外,填充

SYS.AUD$表的 SQLBIND 列和 SQLTEXT CLOB 列。

xml 启用数据库审计,并将所有记录写到 XML 格式的操作系统文件中。

xml,extended 启用数据库审计,输出审计记录的所有列,包括 SqlText 和 SqlBind 的值。

你可以使用 SQL 语句 AUDIT 来设置审计选项,不管如何设置此参数。

用法举例:

因为该初始化参数是静态参数,所以修改后必须重新启动例程。示例如下:

SQL>ALTER SYSTEM SET audit_trail=DB SCOPE=SPFILE;

SQL>STARTUP FORCE;

猜你喜欢

转载自blog.51cto.com/13854012/2431627