Examine the following command;
ALTER SYSTEM SET enable_ddl_logging = TRUE;
Which statement is true?
A.
Only the data definition language (DDL) commands that resulted in errors are logged in the alert log file.
B.
All DDL commands are logged in the alert log file.
C.
All DDL commands are logged in a different log file that contains DDL statements and their execution dates.
D.
Only DDL commands that resulted in the creation of new segments are logged.
E.
All DDL commands are logged in XML format in the alert directory under the Automatic Diagnostic
Repository (ADR) home.
Explanation:
Once DDL logging is turned on, every DDL command will be logged in the alert log file and also the log.xml file.
Note:
* By default Oracle database does not log any DDL operations performed by any user. The default settings for
auditing only logs DML operations.
* Oracle 12c DDL Logging – ENABLE_DDL_LOGGING
The first method is by using the enabling a DDL logging feature built into the database. By default it is turned off
and you can turn it on by setting the value of ENABLE_DDL_LOGGING initialization parameter to true.
* We can turn it on using the following command. The parameter is dynamic and you can turn it on/off on the
go.
SQL> alter system set ENABLE_DDL_LOGGING=true;
System altered.
Elapsed: 00:00:00.05
SQL>
Once it is turned on, every DDL command will be logged in the alert log file and also the log.xml file.