Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Bringing down Oracle in a script.
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: >
> > 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