get_trc.sh – a easy packing tracefile script

Posted by Milo on July 4, 2014 | Short Link

As many of you may know, sometimes when you’re doing a health check on Oracle database. Trace files are needed for analyzing complicated errors.

Are you having trouble on fetching trace file again and again when you go through the error messages one by one OR you gather the Database information from client side, sometimes, you may find you’re not getting the tracefiles, but hard to ask customers to do this job for you.

 

Good news is that we have get_trc.sh script for doing this for us only need a simple configuration, it’s totally help you gather important information, all you need is a FTP SERVER on your computer.

 

Here is the script with v0.6 version till 2014.07.04:

 

The only part you may need to modify, it’s this part:

CURRENT_YEAR : the year where start from alert log.

BEGIN_MONTH  : month in alert log, which wanna make it  a start point.

Here, I am not gonna use day, because in some idle db, we might get the day right, and waste time to guess.

FTP_SER,FTP_USER, FTP_PASSWD :  related with the FTP access, the ip address of FTP SERVER, the upload user name and password.

TARGET_DIR :  is where you need to put the gathering stuffs on the FTP SERVER.

 

You can use this script as this way:

e.g.

The log will show like this:

 

It’s cool so far, right? :)

NOTE: there might be a issue on extend regular expression with grep (Not support ‘-E’ option on solaris 10 ) or egrep(it seems the same syntax works for linux, AIX, but not on solaris 10), it’s a little bit weird. I will keep trying to fix this issue.

 

SCRIPT TESTED PASS ON PLATFORM: AIX 5.3, RHEL (OEL) 5,6.

Please TAKE YOUR RISK TO USE THIS SCRIPT!

If you have any feedback, please give me a comment or send me an email.

Thanks and Good luck.

 

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Copyright © 2014-2017 Come on, Milo! All rights reserved.
This site is using the Shades theme, v2.2.1.1, from BuyNowShop.com.