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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Shutdown/Startup on Linux - won't work at server level

Re: Shutdown/Startup on Linux - won't work at server level

From: Keith Moore <kmoore_at_zephyrus.com>
Date: Wed, 17 Aug 2005 15:11:25 -0700 (PDT)
Message-ID: <35197.156.153.255.126.1124316685.squirrel@webmail.zephyrus.com>


I finally got it working.

I had to change the dbstart and dbstop lines to remove the ampersand at the end of the line. Is that the minor change you made?

Oracle has the ampersand in their documentation, which runs the command in the background. I assume what was happening is that dbstart would run until the parent process ended and that would cause dbstart to terminate before the database could be actually opened.

Since dbstart was executing and then mysteriously dying when sqlplus was called, I did not pay too much attention to dbora and never thought about how the background process would work.

I feel like Oracle owes me several hours of my life I'll never get back. I guess I'll just add it to their 'tab'.

Keith

>
>> Well, under 10g Release 2, Redhat WS 4 I have it working with a minor
>> error in the dbora script (see script below). There is a couple of
>> other errors but it does not affect the startup or shutdown. Once the
>> file was created in /etc/init.d with permissions 750, I issued
>> 'chkconfig --add dbora' then validated that using
>>
>> find /etc -name '*dbora*'
>>
>> where the scripts were created. Also, I did a
>>
>> chkconfig --list | grep 'dbora'
>>
>> and it shows that dbora startups under levels 345.
>>
>> Mike
>>
>> Here is dbora:
>> #!/bin/sh
>> # chkconfig: 345 99 10
>> # description: Oracle auto start-stop script.
>> #
>> # Set ORA_HOME to be equivalent to the $ORACLE_HOME
>> # from which you wish to execute dbstart and dbshut;
>> #
>> # Set ORA_OWNER to the user id of the owner of the
>> # Oracle database in ORA_HOME.
>> ORA_HOME=/u01/oracle/product/10.2.0
>> ORA_OWNER=oracle
>> if [! -f $ORA_HOME/bin/dbstart]
>> then
>> echo "Oracle startup: cannot start"
>> exit
>> fi
>> case "$1" in
>> 'start')
>> # Start the Oracle databases:
>> # The following command assumes that the oracle login
>> # will not prompt the user for any values
>> echo "Starting Oracle databases"
>> su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
>> echo "Starting Oracle Listener"
>> su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start listener_seed"
>> echo "Starting Oracle Enterprise Manager"
>> su - $ORA_OWNER -c "$ORA_HOME/bin/emctl start dbconsole"
>> ;;
>> 'stop')
>> # Stop the Oracle databases:
>> # The following command assumes that the oracle login
>> # will not prompt the user for any values
>> echo "Stopping databases"
>> su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
>> echo "Stopping Oracle Enterprise Manager"
>> su - $ORA_OWNER -c "$ORA_HOME/bin/emctl stop dbconsole"
>> echo "Stopping Oracle Listener"
>> su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop listner_seed"
>> ;;
>> esac
>>
>>

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Aug 17 2005 - 17:13:26 CDT

Original text of this message

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