Friday, August 28, 2009

adcri commands

# using adcri to purge logs older than 31 days

[prod-oranode-30:+ASM1]$ pwd
/oralogs/diag
[prod-oranode-30:+ASM1]$ du -sk *
56324 asm
12268 rdbms
51336 tnslsnr
[prod-oranode-30:+ASM1]$ adrci

ADRCI: Release 11.1.0.7.0 - Production on Fri Aug 28 13:49:23 2009

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

ADR base = "/opt/oracle/product"
adrci> SET HOMEPATH diag/asm/+asm/+ASM1
adrci> PURGE -age 44640
adrci> exit
[prod-oranode-30:+ASM1]$ du -sk *
35108 asm
12268 rdbms
51336 tnslsnr

# running purge scripts

# purge.adrci
SET HOMEPATH diag/rdbms/pd01ref/pd01ref1
PURGE -age 44640
SET HOMEPATH diag/asm/+asm/+ASM1
PURGE -age 44640

adrci script=purge.adrci