Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Still experiencing Auto-shtudown problem on RedHat 8.0
Thanks Nelson. I do realize that su - gets a user's environment. In
fact, in my script I set ORA_OWNER=oracle and then su - $ORA_OWNER.
Oracle's .bash_profile is properly configured to set the ORACLE_SID,
ORACLE_BASE and ORACLE_HOME. $ORACLE_HOME/bin is in my PATH.
$ORACLE_HOME/bin is where dbshut resides. dbshut is called by the stop
section of dbora. I should mention again that when I manually run dbora
stop, the database does shutdown. So I know that the oracle user's
environment is being used, or else it wouldn't know where to look for
dbshut, and the db wouldn't shutdown. You mention that you stop Oracle
from rc5.d as well. I'm a little shaky on the sysVinit stuff. Do links
beginning with S get 'start' issued to their corresponding scipts when
you switch to a particular run level(in your case, run level 5), and
links beginning with a K get issued a 'stop' to their corresponding
scripts when you exit that run level? I have pasted in my dbora script.
Perhaps you might see something that I'm missing.
/etc/init.d/dbora
#!/bin/sh # # description: starts the oracle dabase deamons #
ORA_OWNER=oracle
ORA_HOME=/u01/app/oracle/product/9.2.0.1.0
case "$1" in
'start')
echo -n "Starting Oracle9i: "
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
echo -n "Starting the Listener for 9i: " su - $ORA_OWNER -c "${ORA_HOME}/bin/lsnrctl start"
touch /var/lock/subsys/oracle9i
echo
;;
'stop')
echo -n "Shutting Oracle9i: "
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
echo -n "Shutting down Listener for 9i: " su - $ORA_OWNER -c "${ORA_HOME}/bin/lsnrctl stop"
rm -f /var/lock/subsys/oracle9i
echo
;;
'restart')
echo -n "Restarting Oracle9i: "
$0 stop
$0 start
echo
;;
*)
echo "Usage: oracle9i {start | stop | restart }"
exit 1
esac
exit 0
Nelson Baumgarten wrote:
> Mark ; > I have Redhat 8.0 with Oracle and I believe my startup and > shutdown work. You have to su to Oracle since the root runs allstartups. I
> to S50 oracle in rc5.d. The file startoracle has the command; > su oracle --login --command=/opt/oracle/product/9.0.1/bin/dbstart. This > starts up oracle. I do a similar thing to shutdown oracle I use thecommand
> I hope this helps you. su --help explains the bash shell.. > "Mark" <mark_at_somewhere.com> wrote in message > news:3db4362a$1_2_at_corp.newsgroups.com... > >>Hi, >> >>I still can't figure out why Oracle won't shutdown at reboot or system >>shutdown. My dbora script is attached. I have created K10dbora links > > from > >>/etc/rc0.d and /etc/rc6.d that look like this: >>lrwxrwxrwx 1 root root 15 Oct 14 K10dbora -> > > ../init.d/dbora > >>/etc/init.d/dbora looks like this: >>-rwxr-xr-x 1 root root 819 Oct 14 dbora >> >>I tried making the 'K' number unique - changed it to K01dbora, but no > > change > >>in behavior. As I mentioned before, Oracle will start automaticallyusing
>>S99dbora links in /etc/rc3.d and /etc/rc5.d. And if I manually run >>/etc/init.d/dbora stop, the database shuts down. If I run shutdown -h > > now, > >>shutdown -r now, init 6 or init 0 the db won't shutdown. Again, any help >>would be appreciated. Thanks. >> >>Mark >> >> >> >> >> >>"Mark" <mark_at_somewhere.com> wrote in message >>news:3daf37b1_4_at_corp.newsgroups.com... >> >>>Hi, >>> >>>I am having a problem getting Oracle to shutdown automatically on my >> >>RedHat >> >>>8.0 installation. I have dbora in /etc/init.d. This script calls >> > dbstart > >>>and dbshut depending on start or stop usage. If I manually run dbora >> >>stop, >> >>>the database shuts down. So, I know that the script works. I created a >>>link in /etc/rc0.d, K10dbora, which points to /etc/init.d/dbora. My >>>understanding is that this should cause the db to shutdown when the >> >>computer >> >>>is shut down. Unfortunately it doesn't work. BTW - the db starts >>>automatically(as it should)on boot up. Now, K10 is not unique. Does it >>>need to be? I didn't think that it had to be, but I could be wrong. >> > Any > >>>insight on this would be much appreciated. Thanks. >>> >>>Mark >>> >>> >>> >>> >>> >>>-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- >>>http://www.newsfeeds.com - The #1 Newsgroup Service in the World! >>>-----== Over 80,000 Newsgroups - 16 Different Servers! =----- >> >> >> > > > ---------------------------------------------------------------------------- > ---- > > > >> >> >>-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- >>http://www.newsfeeds.com - The #1 Newsgroup Service in the World! >>-----== Over 80,000 Newsgroups - 16 Different Servers! =----- >