You execute the following commands to audit database activities:
SQL > ALTER SYSTEM SET AUDIT_TRIAL=DB, EXTENDED SCOPE=SPFILE;
SQL > AUDIT SELECT TABLE, INSERT TABLE, DELETE TABLE BY JOHN By SESSION
WHENEVER SUCCESSFUL;
Which statement is true about the audit record that generated when auditing after instance
restarts?
A.
One audit record is created for every successful execution of a SELECT, INSERT OR DELETE
command on a table, and contains the SQL text for the SQL Statements.
B.
One audit record is created for every successful execution of a SELECT, INSERT OR DELETE
command, and contains the execution plan for the SQL statements.
C.
One audit record is created for the whole session if john successfully executes a SELECT,
INSERT, or DELETE command, and contains the execution plan for the SQL statements.
D.
One audit record is created for the whole session if JOHN successfully executes a select
command, and contains the SQL text and bind variables used.
E.
One audit record is created for the whole session if john successfully executes a SELECT,
INSERT, or DELETE command on a table, and contains the execution plan, SQL text, and bind
variables used.
Explanation:
Note:
* 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 (11g) of Oracle Database, both BY SESSION and BY
ACCESS cause Oracle Database to write one audit record for each audited statement and
operation.
* BY ACCESS
Specify BY ACCESS if you want Oracle Database to write one record for each audited statement
and operation.
Note:
If you specify either a SQL statement shortcut or a system privilege that audits a data definition
language (DDL) statement, then the database always audits by access. In all other cases, the
database honors the BY SESSION or BY ACCESS specification.
* For each audited operation, Oracle Database produces an audit record containing this
information:
/ The user performing the operation
/ The type of operation
/ The object involved in the operation
/ The date and time of the operation
Oracle Database SQL Language Reference 12c
A indeed
http://docs.oracle.com/database/121/SQLRF/statements_4007.htm#SQLRF01107
A
D
A. By default AUDIT_TRIAL=DB. Database was not restarted does the extended did not take any affect.
This is alternative D for sure. It explicitly says that the instance was restarted. It then records SQL text and bind variables.
https://docs.oracle.com/cd/B19306_01/server.102/b14237/initparams016.htm#REFRN10006
I think the same. It says that te instance was restarted
EXTENDED:
Performs all actions of AUDIT_TRAIL=db, and also populates the SQL bind and SQL text CLOB-type columns of the SYS.AUD$ table, when available. These two columns are populated only when this parameter is specified.
https://docs.oracle.com/database/121/REFRN/GUID-BD86F593-B606-4367-9FB6-8DAB2E47E7FA.htm#REFRN10006
By 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.
https://docs.oracle.com/database/121/SQLRF/statements_4007.htm#SQLRF01107
A is correct.