Re: v$abc.. table names - nightmare

From: John Hurley <hurleyjohnb_at_yahoo.com>
Date: Tue, 17 May 2011 14:19:19 -0700 (PDT)
Message-ID: <d3b4ebda-3df3-488f-886d-80c366d2e865_at_s9g2000yqm.googlegroups.com>



Neil:

# This is just some simple scheduled Oracle monitoring script to check it is in a generally accessible and healthy state.

Dude this has been done and redone so many times in the last 25 years that unless you know exactly what you are doing and why you are doing it ... using something pre-written and off the shelf will at least initially probably be a whole lot better than what you are currently doing.

Not willing to share my specific scripts ( work rule ) but four specific suggestions I would toss out for consideration.

  1. Have some kind of file based switch that will turn on and off whether the script should run. Like look for if a file exists and it does exist then maybe it is ok to continue.

In other words an easy way to turn off your monitoring script(s) from executing is to create and/or remove a file.

2) Have the script then look for a specific process to check if the database instances is really up ( like look for the instance specific smon process ).

No point in trying to execute the sqlplus part if the database is up.

3) When your script executes spool out the results into a file and develop some other logic that validates the output and decides if things are ok or problematic. I tend to write some very specific parsing scripts that examine the lines of output.

For example after driving an rman disk backup I have a validation script that looks at all the output and decides if every single different multiple step worked successfully or not.

4) Decide on some specific rules for what the email subject lines should go out with ( ERROR on $hostname for reason blah blah blah WARNING on ... SUCCESS on ... FAILURE on ).

Initially email out all the good results as well as all the bad ones. After a while when you are sure everything is peachy then you "might" decide to rip some of the stuff out.

All in all ... it might be a whole lot easier for you to either find some good prewritten stuff ( google things like "oracle health check script" maybe beware of the references to the site run by you know who ) or pay someone to do some remote monitoring and get them to deploy a solution for you.

Another possible option is Toad and the built in health check scripts that are available. Think there are a whole bunch of ways to turn on and off various portions of that checking.

Not to be rude but if you are struggling just to be able to in a script issue sqlplus commands against v$database it seems like you have a pretty steep learning curve in your immediate future. Received on Tue May 17 2011 - 16:19:19 CDT

Original text of this message