3

根据本教程,我使用以下选项在数据库上配置了审计:

AUDIT ALL BY db BY ACCESS;
AUDIT SELECT TABLE, UPDATE TABLE, INSERT TABLE, DELETE TABLE BY db BY ACCESS;
AUDIT EXECUTE PROCEDURE BY db BY ACCESS;

我从 java 准备查询并运行SELECT查询。DBA_AUDIT_TRAIL表显示我的SELECT查询,但SQL_TEXT字段SQL_BIND为空。我怎么能看到他们?我应该启用任何其他选项吗?我正在使用 Oracle 11.2 快捷版。这是因为它是特快版吗?

4

1 回答 1

8

SQLTEXTSQLBIND仅在AUDIT_TRAIL选项设置为时填充db, extended。这是一个例子:

SQL> alter system set audit_trail=db,extended scope=spfile;

System altered

重启实例。

SQL> audit select on your_table;

Audit succeeded

SQL> select sqltext from sys.aud$ where obj$name = 'YOUR_TABLE';

SQLTEXT
--------------------------------------------------------------------------------
null

SQL> select count(*) from your_table;

  COUNT(*)
----------
         3

SQL> select sqltext from sys.aud$ where obj$name = 'YOUR_TABLE';

SQLTEXT
--------------------------------------------------------------------------------
select count(*) from your_table


SQL> 
于 2012-10-27T13:08:17.957 回答