您好,登錄后才能下訂單哦!
小編給大家分享一下oracle12c中enable_ddl_logging怎么用,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!
1、設置參數,動態參數
SQL> alter system set enable_ddl_logging=true; System altered. SQL> create table t (id int); Table created. SQL> alter session set container=pdb1; Session altered. SQL> drop table t; Table dropped. SQL>
2、查看ddl日志
<roidb01:cdb:/u01/app/oracle/diag/rdbms/cdb/cdb/log>$cd ddl <roidb01:cdb:/u01/app/oracle/diag/rdbms/cdb/cdb/log/ddl>$ls log.xml <roidb01:cdb:/u01/app/oracle/diag/rdbms/cdb/cdb/log/ddl>$tail -f log.xml level='16' host_id='roidb01' host_addr='fe80::9e8:140c:99e6:7ad9%enp0s3'> <txt>truncate table t </txt> </msg> <msg time='2018-01-25T11:11:10.940+08:00' org_id='oracle' comp_id='rdbms' msg_id='opiexe:4428:2946163730' type='UNKNOWN' group='diag_adl' level='16' host_id='roidb01' host_addr='fe80::9e8:140c:99e6:7ad9%enp0s3'> <txt>create table t (id int) </txt> </msg> <msg time='2018-01-25T11:12:41.503+08:00' org_id='oracle' comp_id='rdbms' msg_id='kpdbLogDDL:19042:2946163730' type='UNKNOWN' group='diag_adl' level='16' host_id='roidb01' host_addr='fe80::9e8:140c:99e6:7ad9%enp0s3'> <txt>drop table t </txt> </msg> ^C <roidb01:cdb:/u01/app/oracle/diag/rdbms/cdb/cdb/log/ddl>$pwd /u01/app/oracle/diag/rdbms/cdb/cdb/log/ddl ---路徑在這里 <roidb01:cdb:/u01/app/oracle/diag/rdbms/cdb/cdb/log/ddl>$
以上是“oracle12c中enable_ddl_logging怎么用”這篇文章的所有內容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內容對大家有所幫助,如果還想學習更多知識,歡迎關注億速云行業資訊頻道!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。