脚踏实地、勇往直前!
全部博文(1005)
分类: Oracle
2013-05-23 10:42:35
SQL> AUDIT Drop ANY TABLE BY scott BY ACCESS WHENEVER Successful;
审计已成功。
有关by session和by access官网的解释如下:
BY SESSION
In earlier releases, BY SESSION caused the database to write a single record for all SQL statements or operations of the same type executed on the same schema objects in the same session. Beginning with this release of Oracle Database, both BY SESSION and BY ACCESS cause Oracle Database to write one audit record for each audited statement and operation. BY SESSION continues to populate different values to the audit trail compared with BY ACCESS. Oracle recommends that you include the BY ACCESS clause for all AUDIT statements, which results in a more detailed audit record. If you specify neither clause, then BY SESSION is the default.
Note:
This change applies only to schema object audit options, statement options and system privileges that audit SQL statements other than data definition language (DDL) statements. The database has always audited BY ACCESS all SQL statements and system privileges that audit a DDL statement.
BY ACCESS
Specify BY ACCESS if you want Oracle Database to write one record for each audited statement and operation.
-- The End --