ADR AUTO PURGE DOESN'T WORK FOR DDL LOG FILES. (Doc ID 2269017.1)

Last updated on MAY 22, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.1 to 12.2.0.1 [Release 11.2 to 12.2]
Information in this document applies to any platform.
ADR AUTO PURGE DOESN'T WORK FOR DDL LOG FILES.

Symptoms

ADR auto purge doesn't work for DDL log files as bellow.

1. Set SHORTP_POLICY to 1 hour and LONGP_POLICY 2 hours using adrci.
adrci> set control (SHORTP_POLICY = 1)
adrci> set control (LONGP_POLICY = 2)
adrci> exit

2. Create DDL log file

sqlplus "/ as sysdba"
alter system set ENABLE_DDL_LOGGING=true;
grant dba to scott identified by tiger;
conn scott/tiger
create table test_tab (col1 number);
drop table test_tab;
conn / as sysdba
alter system set ENABLE_DDL_LOGGING=false;
exit

3. Check if DDL log files are created.

> ls $ADR_HOME/log
ddl ddl_o12102.log debug imdb test

> ls $ADR_HOME/log/ddl
log.xml

4. Wait for 24 hours and check if the log files still exist

> ls $ADR_HOME/log
ddl ddl_o12102.log debug imdb test

> ls $ADR_HOME/log/ddl
log.xml

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms