Re: Basic Scripts for Database Administration

From: John Hurley <johnbhurley_at_sbcglobal.net>
Date: Wed, 24 Jun 2009 07:46:18 -0700 (PDT)
Message-ID: <7d890ee1-fdda-4fdf-b606-53d5580cba55_at_o36g2000vbi.googlegroups.com>



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! Received on Wed Jun 24 2009 - 09:46:18 CDT

Original text of this message