Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Bringing down Oracle in a script.

Re: Bringing down Oracle in a script.

From: Arthur Salazar <asalazar_at_asalazar.visionsolutions.com>
Date: Thu, 28 Jul 2005 09:02:24 -0700
Message-Id: <pan.2005.07.28.16.02.24.185622@asalazar.visionsolutions.com>


Detailed response below...

-arthur

On Wed, 27 Jul 2005 00:15:21 +0000, HansF wrote:

> On Tue, 26 Jul 2005 16:53:40 -0700, Arthur Salazar interested us by
> writing:
> 

>> I am writing a script that will bring Oracle 9i or 10g up or down.
>>
>> Generally I reverse my actions to bring the services down. I notice that
>> after I bring things down that there are occationally processes left
>> around that appear to be part of Oracle or are at least owned by
>> oracle.
>>
>> Can I safely kill these? Should they even be left around?
>>
>> Any thoughts would be appreiciated.
>>
> 
> First thought - assuming you are using a *nix ... use dbstart and dbshut
> instead of writing your own.

Thank you for your response. I will add a little more detail.

First I run on AIX 5 on iSeries and SuSE Linux on iSeries and x86. I am not interested in Windows at this time.

I am not using db{start,shut} for a couple of reasons. Both scripts clearly state that they are for use at boot time. I am not intimiated by that but I did do a detailed analysis of them and got to the second point point where I saw that the only interesting thing they did was a sqlplus /nolog, then a connection, and finally a startup or a shutdown immediate.

This is great as far as it goes but I also need to shut down the listener and any web access. This means starting and stopping Apache on v9i and starting and shutting down em on v10g.

I will run my tests again later today and post a ps of the leftover jobs.

My startup script does (assume appropriate environement set up):

[version 10g]
lsnrctl start
isqlplusctl start
emctl start dbconsole
sqlplus / as sysdba << EOF
startup
quit
EOF   [version 9i]
lsnrctl start
sqlplus /nolog <<EOF
connect / as sysdba
startup
EOF and the shut down is:

[version 10g]

emctl stop dbconsole
isqlplusctl stop
lsnrctl stop
sqlplus / as sysdba << EOF
shutdown immediate
quit
EOF [version 9i]

lsnrctl stop
sqlplus /nolog <<EOF
connect / as sysdba
shutdown immediate
EOF   I start and stop Apache separatly for version 9 with:

apachectl start
apachectl stop

-arthur Received on Thu Jul 28 2005 - 11:02:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US