Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

shutdown script in runlevel

661463Oct 27 2009 — edited Nov 8 2009
Hi,

I know there is a huge amount of ready-to-use shutdown/start scripts for Oracle, but mine a little different.
I dont want Oracle to start when Linux starts, i just want Oracle to shutdown when Linux shutdown.

Here is a script (without comments and such)
#!/bin/sh
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
        su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME"
        ;;
    'stop')
        # Stop the Oracle databases:
        # The following command assumes that the oracle login 
        # will not prompt the user for any values
        su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME"
        ;;
esac
I would like to have the 'stop' part of the script, not the 'start' asssociated code. My Shell knowledge is a little bit rusty and i havent got this to work, therefor i would be glad if some one helped me to remove the 'start'-part but still have a functional script that i could put into Linux runlevels.

Thank for your input
--
Best, Johann
This post has been answered by 506787 on Oct 31 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 6 2009
Added on Oct 27 2009
7 comments
3,625 views