Re: Linux oracle startup shutdown

  • From: "Jared Still" <jkstill@xxxxxxxxx>
  • To: Mark.Bobak@xxxxxxxxxxxxxxx
  • Date: Tue, 19 Sep 2006 15:35:33 -0700

On 9/19/06, Bobak, Mark <Mark.Bobak@xxxxxxxxxxxxxxx> wrote:


Brian, see MetaLink Doc ID 222813.1 "How to Automate Startup/Shutdown of Oracle Database on Linux".


I had not seen that note previously, having just done this myself when needed.

So I tried it out on my dev server.

The script may work fine when the Oracle homes are all one version.
If you use the script as is from the ML note, it will not work
properly if you have 9i and 10g on the same server, at least,
it didn't work for me.

The following modifications will cause it work:

The following is assumed:



  - The linux server has both 9i and 10g versions
  - There is a single listener running in a 10g ORACLE_HOME



This requires some modification of the dbora script, the dbstart script and
the .bash_profile for the oracle owner



dbora changes:

Start the listener before starting the databases



dbstart changes:



The section used to start the listener is commented out. It appears in the
script as follows: (just the first few lines shown)

# First argument is used to bring up Oracle Net Listener

#ORACLE_HOME_LISTNER=$1

#if [ ! $ORACLE_HOME_LISTNER ] ; then

This is done because the dbora script only allows for a single ORACLE_HOME.

If you allow dbora to start the listener, it needs a 10g ORACLE_HOME to
start the correct listener.

You could modify dbstart to only start the 10g listener, but I think it is
easier
to allow dbora to do that, and just prevent dbstart from attempting to start
any listeners.  If you leave dbstart as it comes out of the box, it will
attempt
to start multiple listeners. ( at least that is my experience)



.bash_profile changes:



Setup the oracle environment at login to be the ORACLE_HOME that is used to
start the listener.  This is so that su - oracle -c 'OH/bin/lsnrctl
start'will work correctly from dbora.



Mark, if you're still reading, this is probably nothing new, but I thought

it might be helpful to the OP.


HTH

--
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

Other related posts: