38. To make audit information more productive, the DBA executes the following command before starting
an audit operation:
SQL> ALTER SYSTEM SET AUDIT_TRAIL=DB,EXTENDED SCOPE=SPFILE;
Which statement is true regarding the audit record generated when auditing starts after restarting the
database?
A.It contains only the plan for the SQL statement executed by the user.
B.It contains the SQL text executed by the user and the bind variables used with it.
C.It contains the plan and statistics associated with the SQL statement executed by the user.
D.It contains the plan for the SQL statement executed by the user and the bind variables used with it.
Answer: B
SQL> audit all on test;
Audit succeeded
Executed in 0.016 seconds
SQL> var v_no number;
SQL> exec :v_no := 7788;
PL/SQL procedure successfully completed
Executed in 0 seconds
v_no
---------
7788
SQL> select * from test where empno = :v_no;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
----- ---------- --------- ----- ----------- --------- --------- ------
7788 SCOTT ANALYST 7566 1987-04-19 2.00 20
1 row selected
Executed in 0.032 seconds
v_no
---------
7788
SQL>
SQL> SELECT TIMESTAMP, owner, obj_name, sql_text, sql_bind
2 FROM dba_audit_trail
3 WHERE username = 'TEST'
4 AND obj_name = 'TEST'
5 AND sql_bind IS NOT NULL;
TIMESTAMP OWNER OBJ_NAME SQL_TEXT SQL_BIND
----------- ------ ---------- -------------------------------------------------- -------------
2014-06-11 TEST TEST select * from test where empno = :v_no #1(4):7788
1 row selected