Hướng dẫn dùng adrci để xóa log files (trace files, incident files, listener log files)

 💡 Ổ cứng bị đầy check log file bị nhiều cần xóa bớt đi ta dùng adrci

1. Start ADRCI:

-bash-4.3$ . oraenv
ORACLE_SID = [+ASM1] ? +ASM1
The Oracle base remains unchanged with value /u01/app/oracle
-bash-4.3$ adrci 
 
ADRCI: Release 11.2.0.4.0 - Production on Tue May 16 16:19:40 2017
 
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
 
ADR base = "/u01/app/oracle"
  1. List of available homes:
adrci> show homes
ADR Homes: 
diag/asm/+asm/+ASM1
diag/clients/user_oracle/host_2585172500_11
diag/clients/user_oracle/host_2585172500_80
diag/diagtool/user_oracle/host_2585172500_11
diag/rdbms/orcltest/ORCLTEST1
diag/rdbms/audit/AUDIT1
diag/rdbms/orcl/ORCL1
diag/tnslsnr/oradb1/listener
  1. Xóa log của cái nào thì set home cái đấy vd
adrci> set home diag/tnslsnr/oradb1/listener

4 Deleting previous Trace and ALERT files created before 3600 minutes(1 day) in set home:

adrci> purge -age 3600 -type TRACE
adrci> purge -age 3600 -type ALERT
or xóa all
adrci> purge -age 10080

Related posts

How to deal with ORA-00020: maximum number of processes (%s) exceeded

How to resolve ORA-01111 ORA-01110 ORA-01157 in a physical standby database 

Công cụ tự động khai báo datafile – Oracle