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 30

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


tamil

tamil

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)

Ranjit

Ranjit

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.

Ksumi

Ksumi

The xml format file are log in $ADR_HOME/alert directory…
I think E is right.

Ksumi

Ksumi

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.

John

John

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.

John

John

E is not correct because “All DDL” in XML format , so only one in xml the other is .log(txt).

John

John

thinking again. C or E are both are correct but E is much clear.

SUN

SUN

E is the correct option
As per Oracle student guide

JanK

JanK

E – is false
“…in the alert directory under the Automatic Diagnostic Repository…” not in alert directory but in /log/dll !!

C – OK

ziad abuqasem

ziad abuqasem

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.

Bill

Bill

C
Log.xml is in “…\diag\rdbms\emrep\emrep\log\ddl” folder, not “alert” folder.

Yaseen

Yaseen

which one is correct ? awaiting confirmation from guys, who successfully completed the exam.

Yaseen

Yaseen

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);

Jolsca

Jolsca

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)

Jolsca

Jolsca

C – TRUE

Patty

Patty

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

Athanasios

Athanasios

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

Diogo

Diogo

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

Christine

Christine

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