ITPub博客

首页 > 数据库 > Oracle > ENABLE_DDL_LOGGING 参数使用 监控对象的DDL

ENABLE_DDL_LOGGING 参数使用 监控对象的DDL

原创 Oracle 作者:yewushang 时间:2015-05-15 17:26:45 0 删除 编辑

当需要确定某些ddl操作什么时候发生,确定是表啥时间被动了,可以设置此参数。

此参数支持动态调整。
alter system set enable_ddl_logging=true;

效果图如下:
SQL> create table tmp_lk as select * from dba_objects where rownum=1;


Table created.


SQL> alter table tmp_lk modify object_name varchar2(100);


Table altered.


SQL> 

告警日志如下:
2015-05-15 17:18:20.128000 +08:00
ALTER SYSTEM SET enable_ddl_logging=TRUE SCOPE=BOTH;
2015-05-15 17:18:55.148000 +08:00
create table tmp_lk as select * from dba_objects where rownum=1
2015-05-15 17:20:12.431000 +08:00
alter table tmp_lk modify object_name varchar2(100)



ENABLE_DDL_LOGGING

Property Description
Parameter type Boolean
Default value false
Modifiable ALTER SESSION, ALTER SYSTEM
Range of values true | false
Basic No

ENABLE_DDL_LOGGING enables or disables the writing of a subset of DDL statements to the alert log.

When ENABLE_DDL_LOGGING is set to true, the following DDL statements are written to the alert log:

  • ALTER/CREATE/DROP/TRUNCATE CLUSTER

  • ALTER/CREATE/DROP FUNCTION

  • ALTER/CREATE/DROP INDEX

  • ALTER/CREATE/DROP OUTLINE

  • ALTER/CREATE/DROP PACKAGE

  • ALTER/CREATE/DROP PACKAGE BODY

  • ALTER/CREATE/DROP PROCEDURE

  • ALTER/CREATE/DROP PROFILE

  • ALTER/CREATE/DROP SEQUENCE

  • CREATE/DROP SYNONYM

  • ALTER/CREATE/DROP/RENAME/TRUNCATE TABLE

  • ALTER/CREATE/DROP TRIGGER

  • ALTER/CREATE/DROP TYPE

  • ALTER/CREATE/DROP TYPE BODY

  • DROP USER

  • ALTER/CREATE/DROP VIEW

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29477587/viewspace-1656549/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-02-09

  • 博文量
    53
  • 访问量
    277277