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.
The Answer is C. Please note that only sucessful ddl statements are logged.
The log files are created only in $ADR_HOME/log
in alert log only alter system is catched.
Sun Mar 30 23:30:04 2014
ALTER SYSTEM SET enable_ddl_logging=TRUE SCOPE=BOTH;
Sun Mar 30 23:32:41 2014
ALTER SYSTEM SET enable_ddl_logging=TRUE SCOPE=BOTH;
Sun Mar 30 23:39:35 2014
ALTER SYSTEM SET enable_ddl_logging=FALSE SCOPE=BOTH;
[oracle@ovs trace]$
only in diag/rdbms/…/../log/ two files are capturing this. The xml file is capturing full details and text file having only the commands.
[oracle@ovs log]$ pwd
/oraclebase/diag/rdbms/ora12c1/ora12c1/log
[oracle@ovs log]$ cat ddl/*
create table testing2(a number)
create table testing3( aa number)
[oracle@ovs log]$ cat ddl_ora12c1.log
Sun Mar 30 23:33:26 2014
diag_adl:create table testing2(a number)
diag_adl:create table testing3( aa number)
C – TRUE
DLL command are loged in separate log files
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
C
E
it is E
I am correcting my comment:
to C
The DDL log is stored in the log/ddl subdirectory of the ADR home
not the alert directory.
The xml format file are log in $ADR_HOME/alert directory…
I think E is right.
I am correcting my comment
The log.xml for ddl are store in $ADR_HOME/log/ddl not in $ADR_HOME/alert
C is right.
11g : DDL go both log.xml & alert.log
12c : DDL only go to log.xml
so DDL go to log.xml for any version
E: is correct.
C
E is not correct because “All DDL” in XML format , so only one in xml the other is .log(txt).
thinking again. C or E are both are correct but E is much clear.
E is the correct option
As per Oracle student guide
E – is false
“…in the alert directory under the Automatic Diagnostic Repository…” not in alert directory but in /log/dll !!
C – OK
C
C CORRECT
NOT E :
All DDL commands are logged in XML format in the alert directory under the Automatic
Diagnostic Repository (ADR) home.
why not E because it is created in the new directory $ADR_HOME/log/ddl directory
not in the alert directory.
C
Log.xml is in “…\diag\rdbms\emrep\emrep\log\ddl” folder, not “alert” folder.
which one is correct ? awaiting confirmation from guys, who successfully completed the exam.
Answer is B.
Setting enable_ddl_logging will allow the tracking of all DDL’s in the alert log using the following:
ALTER SYSTEM SET enable_ddl_logging=TRUE
Later, you issue create table:
create table t(x number)
and you see in the alertLSC01.log:
Tue Apr 05 14:43:32 2011
create table t(x number);
I tested
creates a new directory in the path ddl
SQL> ALTER SYSTEM SET enable_ddl_logging=TRUE;
Sistema modificado.
SQL> create table t(x number);
Tabla creada.
looking I found:
(E:\app\Oracle12c\diag\rdbms\orcl\orcl\log\ddl)
create table t(x number)
C – TRUE
E – True
DDL Log
Setting the ENABLE_DDL_LOGGING parameter to TRUE activates DDL logging. All DDL statements are logged into a plain text file and an XML file in the ADR location.
https://oracle-base.com/articles/12c/automatic-diagnostics-repository-adr-enhancements-12cR1
C
C
E for sure.
In Oracle Database 11g, you can set up DDL logging by setting the initialization
parameter enable_ddl_logging to true. When you do this, any DDL changes made will be
logged in the alert log file.
In Oracle Database 12c, when you enable DDL logging, the instance records the DDL logging information in an exclusive DDL logging file that has the same format as your regular alert log. If you set the enable_ddl_logging parameter to true, the instance will record the DDL changes in the log.xml file. If you don’t set this parameter to true, Oracle won’t record these changes to the log.xml or the alert log.
The DDL log file is named log.xml and is created in the $ADR_HOME/log/ddl directory
“E” is definitely wrong! “E” mentions the “alert” directory. If DDL-logging is enabled, then there’s an extra new sub-directory created under the “/log/”, which is named “ddl/”.
So “C” is right, it refers to a “different log file” (this means different from “/alert/log.xml”), which is true according to the Student Guide.
C:
In 12c, Oracle maintains the DDL logs in two files (XML and plain text) under the ADR_HOME as listed below.
XML Version: $ADR_BASE/diag/rdbms/${DBNAME}/${ORACLE_SID}/log/ddl/log.xml
Text Version: $ADR_BASE/diag/rdbms/${DBNAME}/${ORACLE_SID}/log/ddl/${ORACLE_SID}.log
Examine the command:
SQL> ALTER SYSTEM SET ENABLE_DDL_LOGGING=TRUE;
Which two statements are true in this scenario?
A. All data definition language (DDL) commands are logged into the alert log file.
B. All DDL commands are logged into a text file in Automatic Diagnostic Repository (ADR) home.
C. A subset of executed DDL statements is written into an XML file in ADR home.
D. A subset of executed DDL statements is written to the DDL log in ADR home.
E. All DDL commands are logged into a trace file in ADR home.
This is a new question from latest 12c database exam. Please answer
CD
GREETINGS CHRISTINE,
I have my exam on less than a week. Would you be kind enough to send me the dump file please.
[email protected] [email protected]
With regards,
sanjiv ranjit