| |
 |
|
Oracle Tips by Burleson Consulting
|
Remove elderly Oracle trace,
core and dump files
Part of the job of the Oracle DBA on a UNIX server is to e-mail
current trace and core dump files to Oracle support and e-mail
application trace and dump files to code developers. Once problems
have been resolved, the DBA must remove unwanted files from the
Oracle UNIX filesystem. These un-wanted files may include:
* Trace files – Trace files become obsolete as soon as they have
been mailed to the developer staff.
* Core files – Core files may be removed as soon as Oracle support
has received copies of the dump.
* Audit files – Audit files are a nuisance that many DBAs remove
every day.
Below is a script that will automatically remove all trace files
from the background_dump_destination filesystem in UNIX.
# Cleanup trace files more than 7 days
old
root> find $DBA/$ORACLE_SID/bdump/*.trc -mtime +7 -exec rm {} \;
root> find $DBA/$ORACLE_SID/udump/*.trc -mtime +7 -exec rm {} \;
root> find $DBA/$ORACLE_SID/cdump/*.trc -mtime +7 -exec rm {} \;
Note that the first part of this script (before the –exec) displays
all trace files that are more than 7 days old.
root> find $DBA/$ORACLE_SID/bdump/*.trc -mtime +7
/u01/app/oracle/admin/janet1/bdump/janet1_arc0_25005.trc
/u01/app/oracle/admin/janet1/bdump/janet1_arc0_25173.trc
/u01/app/oracle/admin/janet1/bdump/janet1_arc0_9312.trc
/u01/app/oracle/admin/janet1/bdump/janet1_arc0_9425.trc
/u01/app/oracle/admin/janet1/bdump/janet1_arc1_14300.trc
/u01/app/oracle/admin/janet1/bdump/janet1_arc2_14380.trc
/u01/app/oracle/admin/janet1/bdump/janet1_pmon_25159.trc
/u01/app/oracle/admin/janet1/bdump/janet1_snp0_25171.trc
/u01/app/oracle/admin/janet1/bdump/janet1_snp0_8188.trc
|
Download your Oracle scripts now:
www.oracle-script.com
The
definitive Oracle Script collection for every Oracle professional DBA
|
|