ORACLE : HOME GETTING FILLED UP & DATABASE GOING INTO STALE STATE – Part 1 (Unix Commands)

Share via:
If the Oracle Home is filled and the DB gets hanged, then the first thing we need to check is
— Audit File / Network Logs / dump locations
— Check the file system using the below command
df -h | grep oracle  (IF THE OUTPUT HAS 100% USAGE)
 
cd $ORACLE_HOME/rdbms/audit

du -sk audit

 
— If the Audit directory is occupying the most of the space
— Deleting audit log files that are older than 10 days by using the below command.
cd $ORACLE_HOME/rdbms/audit
find . -name “*.aud” -mtime +10 -exec rm -rf {} \;
— If you do not require audit logs then issue the below command to clear all Audit log files.
rm -rf *.aud
 
— Deleting Network log file which is occupying more space … before deleting make sure that you are not deleting the current Log file.
cd $ORACLE_HOME/network/log
— Delete the log file which is occupying more space using the below command
rm -rf xxxxx*.log
 
Delete core & dump files from Admin Directories
find /opt/oracle/admin/orcl/bdump -name “cdmp*”  -exec rm -r {} \;
find /opt/oracle/admin/orcl/cdump -name “core_*”  -exec rm -r {} \;
 
— Delete the trace files that are older than 3 months
find . -name “*.trc” -mtime +90 -type f -exec rm -rf {} \;
 
Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (9 votes, average: 5.00 out of 5)
Loading...

3 thoughts on “ORACLE : HOME GETTING FILLED UP & DATABASE GOING INTO STALE STATE – Part 1 (Unix Commands)

Add Comment