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.
Not correct for 12c. Per 12c documentation:
ENABLE_DDL_LOGGING enables or disables the writing of a subset of data definition language (DDL) statements to a DDL log.
The DDL log is a file that has the same format and basic behavior as the alert log, but it only contains the DDL statements issued by the database. The DDL log is created only for the RDBMS component and only if the ENABLE_DDL_LOGGING initialization parameter is set to true. When this parameter is set to false, DDL statements are not included in any log.
The DDL log contains one log record for each DDL statement issued by the database. The DDL log is included in IPS incident packages.
There are two DDL logs that contain the same information. One is an XML file, and the other is a text file. The DDL log is stored in the log/ddl subdirectory of the ADR home.
exactly.
right Answer is E
I think C. That web explanation is wrong, the JJ seems right. XML is stored in $ORACLE_BASE/diag/rdbms/dbname/sid/log/ddl and text in $ORACLE_BASE/diag/rdbms/dbname/sid/log/
E says that is stored in the “alert directory” which make it wrong.
B is wrong because ddl are not logged into alert log