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: need valid dbstart script 10.2.0.1.0 on Solaris 10 Sparc

Re: need valid dbstart script 10.2.0.1.0 on Solaris 10 Sparc

From: Tony van Lingen <tony.vanlingen_at_epa.qld.gov.au>
Date: Wed, 15 Nov 2006 10:55:00 +1000
Message-ID: <455A6564.4090403@epa.qld.gov.au>


It's not a valid init script.

We use the following on our Solaris 9 and RHEL4 boxes (which is where the chkconfig line is for):

---

#!/usr/local/bin/bash
# chkconfig: - 95 5
# description: Oracle Database control

# 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=/usr/local/oracle/product/dbs/10.1 ORA_OWNER=oracle if [ ! -f $ORA_HOME/bin/dbstart ] then echo "Oracle startup: cannot start" exit fi
# a function to control all dbconsoles for the autostart instances on
the box at once.
# the sole parameter is 'start' or 'stop'
ctlDBconsole(){ if [ -f ${ORA_HOME}/bin/emctl ] ; then SIDS=`egrep ':Y$' /var/opt/oracle/oratab|cut -d: -f1` for i in $SIDS; do su - $ORA_OWNER -c ". /etc/profile; ORACLE_SID=${i} $ORA_HOME/bin/emctl $1 dbconsole " done 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 ". /etc/profile; $ORA_HOME/bin/dbstart; " # Nobody starts the listener to mitigate attack risk. Nobody can stop it, and root. su - nobody -c ". /etc/profile; $ORA_HOME/bin/lsnrctl start" ctlDBconsole start ;; 'stop') # Stop the Oracle databases: # The following command assumes that the oracle login # will not prompt the user for any values ctlDBconsole stop $ORA_HOME/bin/lsnrctl stop su - $ORA_OWNER -c ". /etc/profile; $ORA_HOME/bin/dbshut" ;; esac --- Cheers, Tony David Sharples wrote: > whats wrong with the dbstart script ORACLE_HOME/bin ? > > On 14/11/06, *Frank Rotchford* <frank_at_rotchford.com > <mailto:frank_at_rotchford.com>> wrote: > > Can anyone post a working script? > > -- Tony van Lingen Tech One Contractor Information Management Corporate Development Division Environmental Protection Agency Ph: (07) 3234 1972 Fax: (07) 3227 6534 Mobile: 0413 701 284 E-mail: tony.vanlingen_at_epa.qld.gov.au Visit us online at www.epa.qld.gov.au -- ___________________________ Disclaimer This e-mail, including attachments if any, has originated from a Queensland government agency and may contain information that is confidential, or covered by legal professional privilege, and is intended for the named recipient(s) only. If you have received this message in error, you are asked to inform the sender as quickly as possible and delete this message and any copies of this message from your computer system network. Any form of disclosure, modification, distribution and/or publication of this e-mail, including attachments is prohibited. Unless otherwise stated, this e-mail, including attachments represents the views of the sender and not the views of the Environmental Protection Agency. Although this e-mail has been checked for the presence of computer viruses, the Environmental Protection Agency provides no warranty that all possible viruses have been detected and cleaned. Any use of this e-mail could harm your computer system. ___________________________ -- http://www.freelists.org/webpage/oracle-l
Received on Tue Nov 14 2006 - 18:55:00 CST

Original text of this message

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