Which statement is true?

Examine the following command;
ALTER SYSTEM SET enable_ddl_logging = TRUE;
Which statement is true?

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.



Leave a Reply 6

Your email address will not be published. Required fields are marked *


emavw

emavw

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. 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.

http://docs.oracle.com/database/121/REFRN/refrn10302.htm#REFRN10302

i think that E is correct

Mike Yeap

Mike Yeap

I think E is not correct, cause there are two files generated when ENABLE_DDL_LOGGING is set to TRUE. One is a text file (with only the DDL commands but no dates) is located in ADR_HOME/log, another is the XML format file (with DDL commands and execution timestamp) which is located in ADR_HOME/log/ddl. But E indicates ALERT directory, which is not correct.

Answer C actually means the XML format DDL log file in ADR_HOME/log/ddl/

Piotr

Piotr

https://docs.oracle.com/database/121/REFRN/GUID-6FBA6147-D545-4E7D-94F0-A97EC1C721AE.htm

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.