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.
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)- A14% (7)
- B6% (3)
- C76% (38)
- D2% (1)
- E2% (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.
Per-statement recording is the behavior of BY ACCESS auditing, not BY SESSION; BY SESSION consolidates all occurrences within a session into one record.
The command audits the use of the DROP ANY TABLE privilege by SCOTT, not the act of SCOTT granting that privilege to another user.
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.
The BY scott clause restricts auditing to SQL executed BY SCOTT himself, not to DDL performed by others on tables that SCOTT owns.
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
Community Discussion
No community discussion yet for this question.