Enable DDL logging in Oracle 12c

We need to enable DDL logging sometimes to track all DDL operations performed in database level.


Step 1:-Please set ENABLE_DDL_LOGGING to TRUE


Enter user-name: / as sysdba

SQL> show parameter ENABLE_DDL_LOGGING;

———————————— ———– ——————————
enable_ddl_logging boolean FALSE
SQL> alter system set ENABLE_DDL_LOGGING=TRUE;

System altered.

Step 2:-Identify where the xml files of DDL logging will be generated


SQL>select * from v$diag_info;

1 Diag Alert

Step 3:-Perform the DDL


sqlplus test/test


SQL> create table t_audit(c1 char(100));

Table created.

Step 4:-Please check the log.xml in following location


cd /u01/app/oracle/diag/rdbms/orcl/ORCL/log/ddl

cat log.xml

Here you can find host and IP details.

About the Author

debasis maity

12+ years of rich experience on Database Administrations and on Infrastructure Solution Architect. AWS Certified Solution Architect and Senior Oracle DBA

1 thought on “Enable DDL logging in Oracle 12c

Leave a Reply

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