Re: Basic Scripts for Database Administration

From: joel garry <joel-garry_at_home.com>
Date: Thu, 25 Jun 2009 10:19:41 -0700 (PDT)
Message-ID: <fa54686f-bd36-4f5e-9507-bb77628abcc8_at_a5g2000pre.googlegroups.com>



On Jun 24, 5:35 pm, exazonk <exaz..._at_gmail.com> wrote:
> On Jun 25, 12:46 am, John Hurley <johnbhur..._at_sbcglobal.net> wrote:
>
>
>
> > On Jun 24, 1:48 am, exazonk <exaz..._at_gmail.com> wrote:
>
> > > Has anyone come across a few scripts that would make Oracle database
> > > administration easier?
>
> > > For example, the following command:
>
> > > execSql -d=DB_NAME -f=/ora/sql/chk_tspaces.sql -a=80 -e=on_output -
> > > g=DBA
>
> > > The above command would run the sql file (probably using sqlplus)
> > > using the argument, 80%, as a threshold to check to see if any
> > > tablespaces had exceeded this. If the script returned any output, then
> > > this would cause an email to be sent to the DBA group.
>
> > > Or to run statspack every day from crontab:
>
> > > execSql -d=DB_NAME -c "exec perfstat.statspack.snap;" -e on_error -
> > > g=DBA
>
> > > So the above command would be run and if it produced an error, it
> > > would email the DBA group.
>
> > > The execSql script could then be used to run an entire suite of sql
> > > files, or rman scripts, so that database administration was easier.
>
> > > The script, execSql, would probably be scripted in perl so that is was
> > > multi-platform.
>
> > > Thanks
>
> > Are you new to this game?
>
> > People have been defining/collecting and putting out free and not free
> > versions of stuff like this for 10/15+ years in the oracle area.
>
> > While certainly new features and what you need to do has changed since
> > the 7.3 days ... it was all pretty much done and developed.
>
> > Religious wars develop about if you should use perl or just basic
> > shell scripting.
>
> > Someone published a book on perl scripting for oracle stuff not long
> > ago so maybe that's what you want to look at buying ( that book ... I
> > am sure someone will supply details ).
>
> > Other people these days thing you should stick with OEM and let oracle
> > do the development work.
>
> > Have fun!- Hide quoted text -
>
> > - Show quoted text -
>
> I guess there are many ways to skin a cat, but there are probably only
> a few that are the most efficient.
>
> It is interesting finding out how people admin their databases as each
> DBA probably thinks that they have the best method.
>
> I'm just wondering if there are any good sites that focus on
> production DBA stuff on a large amount of databases spread out over a
> lot of servers.
>
> If you just got a new job in which you inherited 10 servers, with 10
> databases on each server, and no administration for the databases
> existed yet, what approach would you take to providing DBA support?

The first thing I would do is wonder why there are 10 databases on each server. There wouldn't be many sites that focus on such a thing, since it would be so strange. Maybe an outsourcing business, but that model tends to be so flawed they probably don't have enough money to pay for proper administration. The cloud business is still too misty. Grid control is supposed to address this kind of issue, but I wouldn't know about that. What little I've seen is reminiscent of juggling cats and snowglobes.

Be sure and take to heart admonitions about trusting scripts from the internet, or even support or the documentation.

I used to collect scripts and drag them around with me, but eventually
that became too much useless work to keep them updated, and too many
turned out to be based on myths and legends.  Nowadays, if there are
any problems I focus on them specifically, the monitoring is the least of it, dbconsole is good enough for the usual suspects.

jg

--
_at_home.com is bogus.
http://www3.signonsandiego.com/stories/2009/jun/25/us-judges-murder-threats-062509/?nation&zIndex=122400
Received on Thu Jun 25 2009 - 12:19:41 CDT

Original text of this message