ADRCI: Automatic diagnostic repository command interface, used to manage the diagnostic, health monitor, or incident packaging solutions for Oracle databases.
This is the small adrci automatic purge script rather to rely on traditional log purging or housekeeping scripts.
This script will check in /etc/oratab and list down all oracle homes and then set those Oracle ADR bases and clean up the traces/incidents/logs etc.
Download Script here:- ADRCI_Purge.sh
Hope this helps
-Thanks
Geek DBA
Hi Geek DBA,
>> $ORACLE_HOME/bin/adrci exec=”set base /data/$DB;show homes”|grep -v : | while read file_line
Setting base as /data/$DB is only an example? or universally applies in any environment?
Secondly, what value is default for ORACLE_BASE ,if it is not set explicitly,but only if ORACLE_HOME is set
Hi Vijay,
I have hardcoded /data/ since my environment contains only that as starting name of any filesystem, you can customize by generating a dynamic statement from the v$datafile and store it in variable and pass it on.
like this,
select distinct substr(file_name, 1, instr(file_name, ‘/’,-1)) PATH from dba_data_files ;
-Thanks