Skip to content
Advertisements

Enable DDL logging

Enable DDL Logging:

ENABLE_DDL_LOGGING enables or disables the writing of a subset of data definition language (DDL) statements to a DDL log.

SQL> show parameter enable_ddl_logging

NAME TYPE VALUE
———————————— ———– ——————————
enable_ddl_logging boolean FALSE

SQL> alter system set enable_ddl_logging=TRUE scope=both;

System altered.

SQL> show parameter enable_ddl_logging

NAME TYPE VALUE
———————————— ———– ——————————
enable_ddl_logging boolean TRUE

SQL> select value from v$diag_info where name=’ADR Home’;

VALUE
——————————————————————————–
/premia/app/12c/oracle/diag/rdbms/oradb/oradb

SQL>

SQL> select value from v$diag_info where name=’ADR Home’;

VALUE
——————————————————————————–
/premia/app/12c/oracle/diag/rdbms/oradb/oradb

SQL> conn test/test123
Connected.
SQL> create table invoicenum(invoice number);

Table created.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Advanced Analytics
and Real Application Testing options

[premiadb:oracle:oradb]$ pwd
/premia/app/12c/oracle/diag/rdbms/oradb/oradb/log/ddl

[premiadb:oracle:oradb]$ cat log.xml

<msg time=’2017-02-21T15:25:47.163+03:00′ org_id=’oracle’ comp_id=’rdbms’
msg_id=’opiexe:4383:2946163730′ type=’UNKNOWN’ group=’diag_adl’
level=’16’ host_id=’premiadb’ host_addr=’10.1.4.66′>
<txt>create table invoicenum(invoice number)
</txt>
</msg>

Reference :

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

 

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: