Re: How to screw up DBUA inadvertently.

From: Jared Still <jkstill_at_gmail.com>
Date: Wed, 27 Jun 2012 08:50:19 -0700
Message-ID: <CAORjz=PeuHVGcaTvtPx+PwB-F3n3vfas+bNuD9YOFx4Uf4w1Kg_at_mail.gmail.com>



On Thu, Jun 21, 2012 at 1:43 AM, Norman Dunbar <oracle_at_dunbar-it.co.uk>wrote:
> The moral to this tale is simple, don't put SQL in glogin.sql (or
> login.sql) if you ever shut down your databases!
>
>

In addition I would say make sure you always unset the SQLPATH environment variable before doing any kind of maintenance work.

SQLPATH may have been set in login profile, or perhaps set by the DBA (you) while doing some other preparatory work.

unset SQLPATH goes in most of my shell scripts that drive SQL.

If a shell script is using sqlplus -S, and SQLPATH is set, it can be a little
frustrating to see that a script is hanging for no apparent reason.

Usually this would happen for the mentions you mention - SQL spawned by login.sql that doesn't work on a closed database.

Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist Oracle Blog: http://jkstill.blogspot.com Home Page: http://jaredstill.com

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jun 27 2012 - 10:50:19 CDT

Original text of this message