nerdexam
Oracle

1Z0-052 · Question #34

What is the effect of this command? SQL> AUDIT DROP ANY TABLE BY scott BY SESSION WHENEVER SUCCESSFUL;

The correct answer is C. One audit record is created for the whole session if user SCOTT successfully drops one or more. The BY SESSION clause causes Oracle to write one audit record per session for the audited action, rather than one record per individual statement.

Implementing Oracle Database Auditing

Question

What is the effect of this command? SQL> AUDIT DROP ANY TABLE BY scott BY SESSION WHENEVER SUCCESSFUL;

Options

  • AOne audit record is created for every successful DROP TABLE command executed in the session
  • BOne audit record is generated for the session when SCOTT grants the DROP ANY TABLE privilege
  • COne audit record is created for the whole session if user SCOTT successfully drops one or more
  • DOne audit record is created for every session of any other user in which a table owned by SCOTT
  • EOne audit record is created for every successful DROP TABLE command executed by any user to

How the community answered

(50 responses)
  • A
    14% (7)
  • B
    6% (3)
  • C
    76% (38)
  • D
    2% (1)
  • E
    2% (1)

Why each option

The BY SESSION clause causes Oracle to write one audit record per session for the audited action, rather than one record per individual statement.

AOne audit record is created for every successful DROP TABLE command executed in the session

Per-statement recording is the behavior of BY ACCESS auditing, not BY SESSION; BY SESSION consolidates all occurrences within a session into one record.

BOne audit record is generated for the session when SCOTT grants the DROP ANY TABLE privilege

The command audits the use of the DROP ANY TABLE privilege by SCOTT, not the act of SCOTT granting that privilege to another user.

COne audit record is created for the whole session if user SCOTT successfully drops one or moreCorrect

With BY SESSION, Oracle generates only a single audit trail entry for the entire session if the audited action occurs at least once successfully - so regardless of how many tables SCOTT drops, only one record is written for that session.

DOne audit record is created for every session of any other user in which a table owned by SCOTT

The BY scott clause restricts auditing to SQL executed BY SCOTT himself, not to DDL performed by others on tables that SCOTT owns.

EOne audit record is created for every successful DROP TABLE command executed by any user to

The BY scott clause limits the audit scope to actions taken by SCOTT specifically, not to actions by any user.

Concept tested: Oracle traditional auditing BY SESSION clause

Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/AUDIT-Traditional-Auditing.html

Topics

#statement auditing#BY SESSION#WHENEVER SUCCESSFUL#audit record granularity

Community Discussion

No community discussion yet for this question.

Full 1Z0-052 Practice