Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Offtopic:DBA Math, Beer and OEM

RE: Offtopic:DBA Math, Beer and OEM

From: Steve Orr <>
Date: Fri, 16 Mar 2001 14:16:26 -0800
Message-ID: <>

Hey Dave,

> Create a reporting schema, install perl DBI blah blah blah...
Yeah, I've been getting ready to cobble together a better personal tool kit using perl DBI but they keep interrupting me with silly things to do like my daily job. ;-)

Regarding Canada-US relationships...
How do you spell Canada? C eh? N eh? D eh? ...Groan My wife is Vancouver, BC born and raised but she's a dual citizen because her Montana Mom got her a social security card soon after she was born. So we have intimate "US-Canada relations." This summer we're going to fly two flags... Old Glory and the Maple Leaf side by side. I have relatives ("outlaws") up in Calgary but if I'm ever up there I think I'd rather visit you. Besides, I owe you that stout. :-)

Regarding beer...
If you get a chance, visit your neighbor Walt Weaver just to the south and have a "Moose Drool" and a "Black Star" for me.

Best of Luck on the new job,
Steve Orr

-----Original Message-----
Sent: Friday, March 16, 2001 8:31 AM
To: Multiple recipients of list ORACLE-L wrote:
> Well, I doubt that. With an average reach of 5 feet, it would take less
> than 8 million people to hold hands along the Canada/US border.
> You should check your math more carefully before spouting such nonsense.

Huh? I used

        28,000,000 people
        7000 miles
        5000 feet/mile
        = 0.8 ft = 1 ft/person

One!! I thought it was 10, must of dropped a zero somewhere.

I tell my developers when sizing tables an error of 2 or 4 times is okay but an order of magnitude is a bit much. Thanks for the correction.

More math, Steve has asked how many mile I put on my bicycle while in the valley:

        11 months
        10 days/month   (I telecommuted the other 2 weeks)
        8 miles/day
        = 880 miles
        add the zero I dropped earlier
        = 8800 miles

I thinks thats why it didn't work out in the valley for me. Only a four mile commute, I just didn't have the right attitude :)

You're right Steve, it is still a little cool to be riding in Calgary right now. (though there are some crazies who ride all winter, the thought of it being 30 below, on a bike makes me shiver as I sit here, Brrrrr). March in the valley is very similar to May in Calgary. In Calgary I usually bike from the middle of April to the middle of October. My house is six miles from downtown so I usually put on about 1200 (oh, add the zero, 12000) miles a year there.

Beers!! I found a place that served Humboldt Red Pale Ale. Any companies in Humboldt county looking for a DBA? I patronized the place (The Fish Market) until the keg ran out, notice I didn't mention this until the keg ran out, and then they told me they were not going to order another one. The nerve of some people. Really good beer, I was impressed.

OEM, after reading about the trials and tribulations of people trying to install OEM, why are people wasting their time and money running a product that requires you to take a massive security risk by running Intelligent agent.

I have a set of monitoring scripts (email me offline if you want a copy, do not ask for support if, they do not work on your db, you will learn more if you fix them yourself) that I install at every site. Within 15 minutes I have realtime text reports that cover everything from invalid objects, snapshot refreshes, extents, I/O memory. latches , config parameters.... ( about 6 pages of data).

Create a reporting schema, install perl DBI, (not on the db server, on a client somewhere) gnu-plot or a similar graphing package (anyone know a good perl one?) and within a week you have graphical historical reports.

It's free and you have increased your skills.

As for detecting outages, here is a short ksh script that connects to the db as normal user. If the connect fails, do a network ping. This is to determine which type of admin gets paged. It used to do a tnsping before the ping but since the DBA has to fix it anyways that was redundant. Far more relieable than OEM. And yes I know it is lousy code, but look at my math, what do you expect.

# Database monitor scrip, cron at desired time interval
# requires host ip address, email addresses for dba and sysadmin
# requires $ORACLE_HOME

if [ X$1 != X ]; then
  export DBNAME=$1
  echo "The database name must be passed as a parameter"   exit


DBTEST=test_account/test_password@${DBNAME} export ORACLE_HOME=/wherever/your/oracle/binaries/are

export HOSTN=ip_address_of_your_db_server

${ORACLE_HOME}/bin/sqlplus -s $DBTEST > /dev/null 2>&1 << EOF

        whenever sqlerror exit 1
        select * from dual;
        exit 0

EOF if [ $? -eq 0 ]; then

        echo "`date`: Database $DBNAME is up and running." else

      ping -c 1 $HOSTN | grep " 0% packet loss" > /dev/null
      if [ $? -eq 1 ]; then
        echo "ERROR !!! Network or Server DOWN !!!!"
        echo "Ping of $HOSTN failed !!!"
        mailx -s "ALERT !!!...$HOSTN ping failed" $ADMIN <<-EOF2
                Subject: Pinging $HOSTN failed
                Pinging $HOSTN failed.
                Please investigate!!!
      mailx -s "ALERT!!!...$HOSTN ping failed. sysadmin notified." $DBA
                Subject: Pinging $HOSTN failed
                Pinging $HOSTN failed.
                Please investigate!!!
        echo "`date`: Database $DBNAME on $HOSTN is down!!!"
        mailx -s "ALERT!!!...Database $DBNAME is down on $HOSTN" $DBA
                Subject: Database $DBNAME is down on $HOSTN
                Database $DBNAME is down on $HOSTN.
                Please investigate!!!

EOF1 fi
# end-of-script

The problem with point and click GUI's is that they isolate the DBA from the detailed sql that is needed to really MANAGE Oracle.


Dave Morgan
Senior Database Administrator
Internet Barter Inc.

Please see the official ORACLE-L FAQ:
Author: Steve Orr

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
To REMOVE yourself from this mailing list, send an E-Mail message
to: (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Mar 16 2001 - 16:16:26 CST

Original text of this message