代码改变世界

小知识:enable_ddl_logging参数的设置和日志位置变化

  AlfredZhao  阅读(286)  评论(0编辑  收藏  举报

业务部门需求,要协助客户DBA查truncate操作历史执行情况。

首先确认数据库已开启enable_ddl_logging, 然后从alert中查找没有记录;
之前11g版本都是记录到alert日志中,客户使用的19c数据库,怀疑19c有些变化,于是通过查询MOS

  • How to Enable and Monitor DDL Logging in 11g and 12c (Doc ID 2254010.1)

可以看到相关说明:

  1. ENABLE_DDL_LOGGING is licensed under Oracle Change Management Pack and it is not offered as a standalone option.
  2. You can create an enhancement request, but it is already mentioned that it is part of Oracle Change Management Pack that needs to be purchased as a separate license.
  3. You can set the parameter to TRUE only if you purchased the license for the above mentioned package.
  4. In 11g we have this DDL Logging information under ADR HOME/alert directory only in XML format and Text Format information will be recorded in alert_.log file
  5. In 12c we have this DDL Logging information under ADR HOME/log/ddl_.log ( Text Format ) and ADR HOME/log/ddl/log.xml ( XML format ).

果然12c以后就改变了ddl的记录位置到ADR HOME/log/ddl_<SID>.log,顺利找到后即可协助业务排查。

相关博文:
阅读排行:
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
历史上的今天:
2015-04-09 Greenplum测试环境部署
点击右上角即可分享
微信分享提示