Quantcast
Channel: Database Administration Tips
Viewing all articles
Browse latest Browse all 214

Oracle Logs CLEANUP Script

$
0
0
In this post I'll share with you one of my scripts I'm using to backup and cleanup Oracle logs associated with a specific database on the Oracle server.

This script has been tested on Linux & SUN environments.

You can download the script from here:
https://www.dropbox.com/s/eytsv5duxe95lrh/oracle_cleanup.sh?dl=0

Once you run it, it will ask you to select a database (in case that you have multiple running databases on the server), then will ask you the location you want to backup the logs, then it will start to clean up all logs under udump, bdump, cdump folder plus the audit logs and also will cleanup the logs of the listener associated with the selected database.

Note: This script will backup and delete all logs and will keep the logs of the last 5 days only.

Note: it's recommended to test this script on a test environment before you run it on production ones.

DISCLAIMER: THIS SCRIPT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY WARRANTY. IT IS PROVIDED "AS IS".

Also you can visit and download the whole DBA bundle that includes this script plus many other smart and easy to use scripts for database administration tasks:
http://dba-tips.blogspot.ae/2014/02/oracle-database-administration-scripts.html

DISCLAIMER: THIS SCRIPT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY WARRANTY. IT IS PROVIDED "AS IS".

Here is the code of the script in case the download link didn't open:




Viewing all articles
Browse latest Browse all 214

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>