ENABLE_DDL_LOGGING In Oracle 12c

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarANKUSH THAVALI
  • 08 Oct, 2023
  • 0 Comments
  • 48 Secs Read

ENABLE_DDL_LOGGING In Oracle 12c

This  ENABLE_DDL_LOGGING parameter has been introduced in oracle 12c. 

If this ENABLE_DDL_LOGGING is enabled , then DDL records are written to the ADR.

Enable the parameter:


SQL> show parameter enable_ddl_logging
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
enable_ddl_logging boolean FALSE


SQL> alter system set enable_ddl_logging=true;
System altered.

SQL> show parameter enable_ddl_logging
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
enable_ddl_logging boolean TRUE

Do some DDL operations:

SQL> create user abc identified by abc;
User created.

SQL> create table abc.t8 (n number);
Table created.

SQL> drop user abc cascade;
User dropped.

Check the log:

cd /u02/app/oracle/diag/rdbms/prim/prim/log/ddl

[oracle@localhost ddl]$ more log.xml 
<msg time=’2014-07-10T01:52:00.323-04:00′ org_id=’oracle’ comp_id=’rdbms’  msg_id=’kpdbLogDDL:15115:2946163730′ type=’UNKNOWN’ group=’diag_adl’ level=’16’ host_id=’usa0300lx574′ host_addr=’13.129.131.42′ version=’1′>
create table abc.t8 (n number) drop user abc cascade Here we can see All ddl stmts are logged, Except the create user command.

Hope it Helps!