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

Home -> Community -> Usenet -> c.d.o.server -> Re: Help starting DB on boot -Solaris

Re: Help starting DB on boot -Solaris

From: <ddf_dba_at_my-deja.com>
Date: 2000/06/22
Message-ID: <8itorp$idr$1@nnrp1.deja.com>#1/1

In article <8itltm$fvv$1_at_nnrp1.deja.com>,   yong321_at_yahoo.com wrote:
> In article <3952448B.87F9EB52_at_oralinux.org>,
> Mark Wagner <mark_at_oralinux.org> wrote:
> >
> > --------------D06689063F2C0BD7316328FB
> > Content-Type: text/plain; charset=us-ascii
> > Content-Transfer-Encoding: 7bit
> >
> > I'm having troubles getting the db and listener started when the
> > OS starts after a reboot... Please help.. have tried using the
> > following dbora file in /etc/init.d
> > ****** dbora *************
> > #!/bin/sh
> > ORACLE_SID=LEDB
> > export ORACLE_SID
> >
> > case "$1" in
> > 'start')
> > #Start the Oracle Databases:
> > /home/mark/unlock.ex
> > su -l oracle -c /u01/app/oracle/product/8.1.5/bin/dbstart &
> > su -l oracle -c "/u01/app/oracle/product/8.1.5/bin/lsnrctl start" &
> > ;;
> > 'stop')
> > #Stop the Oracle Databases:
> > su -l oracle -c /u01/app/oracle/product/8.1.5/bin/dbshut &
> > ;;
> > esac
> >
> > ****************** end dbora *******************
> > It works in linux but not on solaris....
> > Any ideas???
> >
> > Mark
> >
> > --
> > -------------------------------------------------------------------
> > Mark Wagner Phone - (650)298-9790 x181
> > Database Engineer mark_at_leaseexchange.com
> > * www.leaseexchange.com *
> > * Dark Oracle of the Sysadmin Sith Darth telinit 6 *
> > --------------------------------------------------------------------
> > Lease Exchange named one of the Top 10 to Watch by RedHerring
 Magazine!
> > www.redherring.com/mag/issue79/herring100/10_to_watch/lease_x.html

>

> Why not post the error message? Check by dmesg or
> more /var/adm/messages.
>

> --
> Yong Huang
>

> (yong321_at_yahoo.com)
> (http://www.stormloader.com/yonghuang/)
>

> Sent via Deja.com http://www.deja.com/
> Before you buy.

>

Try this version:

case "$1" in
'start')
#Start the Oracle Databases:
/home/mark/unlock.ex

#
# v    The lines below have been edited    v
# v                                        v
su - oracle -c /u01/app/oracle/product/8.1.5/bin/dbstart & su - oracle -c "/u01/app/oracle/product/8.1.5/bin/lsnrctl start" & ;;
'stop')
#Stop the Oracle Databases:
#
# v    This line has been edited as well     v
# v                                          v
su - oracle -c /u01/app/oracle/product/8.1.5/bin/dbshut & ;;
esac

I believe the problem arises from not setting all pertinent environment variables necessary for Oracle. Utilizing the 'su - oracle' syntax, rather than the 'su -l oracle' syntax currently coded, will cause 'su' to behave in a manner consistent with actually logging into the system as 'oracle', i.e., reading the .profile and setting the environment properly. Using 'su - l oracle' only changes the effective user id to 'oracle', exactly the same as 'su oracle'. If the environment is not correctly set the instance won't start.

--
David Fitzjarrell
Oracle Certified DBA


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Jun 22 2000 - 00:00:00 CDT

Original text of this message

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