Oracle 11g ADRCI memo for autopurging

SELF-MEMO: How to configure ADRCI in 11.1 or 11.2 to purge logs and change policy for removing unneeded log files.

[oracle@rac1 ~]$ du -sm /u01/app/oracle/diag/
766     /u01/app/oracle/diag/
[oracle@rac1 ~]$ adrci

ADRCI: Release 11.1.0.6.0 - Beta on Fri Jan 7 12:28:45 2011

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

ADR base = "/u01/app/oracle"
adrci> set control (SHORTP_POLICY = 360)
DIA-48448: This command does not support multiple ADR homes

adrci> show homes
ADR Homes:
diag/tnslsnr/rac1/listener_rac1
diag/rdbms/erac/erac1
diag/asm/+asm/+ASM1
adrci> set home diag/tnslsnr/rac1/listener_rac1
adrci> set control (SHORTP_POLICY = 360)
adrci> set control (LONGP_POLICY = 360)
adrci> purge
adrci>
adrci> set home diag/rdbms/erac/erac1
adrci> set control (SHORTP_POLICY = 360)
adrci> set control (LONGP_POLICY = 360)
adrci> purge
adrci>
adrci> set home diag/asm/+asm/+ASM1
adrci> set control (SHORTP_POLICY = 360)
adrci> set control (LONGP_POLICY = 360)
adrci> purge
adrci>
adrci> CNTRL+D
[oracle@rac1 ~]$
[oracle@rac1 ~]$
[oracle@rac1 ~]$ du -sm /u01/app/oracle/diag/
185     /u01/app/oracle/diag/
[oracle@rac1 ~]$

Comments are closed.