Recently I needed to free file system space on database server, because it was full. I looked into the server's filesystem, to find huge dump files but without any success. Suddenly an Idea came up,why not check also Oracle trace files ?
In the 11.2 Release Oracle holds all diagnostic information in the ADR (Automatic Diagnostic Repository) using an automatic retention policy and as usual this policy is too long and a lot of trace files are produced by the database, listener and ASM.
In this case, the main problem was with the listener log file and the recent alert log files (log_XX.xml).
You can find the first and the second in the following directory :
- $ORACLE_BASE/diag/tnslsnr/OracleVm01/listener/alert/log_XX.xml
- $ORACLE_BASE/diag/tnslsnr/OracleVm01/listener/trace/listener.log
adrci>
show homepath
ADR
Homes:
diag/asm/+asm/+ASM1
diag/tnslsnr/OracleVm01/listener
adrci>set homepath diag/tnslsnr/OracleVm01/listener
adrci> purge -age 120 -type ALERT
The option '-age 120' is expressed in minutes and '-type ALERT' will purge only the log_XX.xml of the listener, selected by the command "set homepath diag/tnslsnr/OracleVm01/listener" and positioned in the directory "$ORACLE_BASE/diag/tnslsnr/OracleVm01/listener/alert/"
Attention ! If your database is a RAC, you have to repeat this task in both the nodes of the cluster.
Regarding the listener.log file positioned in the directory "$ORACLE_BASE/diag/tnslsnr/OracleVm01/listener/trace/", because this log file is maintained only for backward compatibility, you have to delete it manually.
Actually, the procedure how to clean it is more complicated because you also have to stop the listener and then delete it.
Soon I'll let you know.
See you in my next blog.
No comments:
Post a Comment