I believe the correct place for oratab on Sun Solaris is
"/var/opt/oracle/oratab".
Here's an example oratab:
#===========================================================================
=====
# Name: oratab
# Written by oracle.
#
# Purpose: This file is used by ORACLE utilities. It is created by
root.sh
# and updated by the Database Configuration Assistant when
creating
# a database.
#
# Usage: A colon, ':', is used as the field terminator. A new line
terminates
# the entry. Lines beginning with a pound sign, '#', are
comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and
home
# directory of the database respectively. The third filed
indicates
# to the dbstart utility that the database should , "Y", or
should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
# Dependencies: 1) Oracle8i (may work with other versions)
#
# Revision Log: (most recent at top)
# 06-29-05 tcp: Created.
#===========================================================================
=====
orcl:/dbvol01/oracle/product/9.2.0:Y
*:/dbvol01/oracle/product/9.2.0:N
And below's an example of a startup script (/etc/init.d/dboracle). To
follow the standard configuration, you'll need to create a couple symlinks
(as root) like so:
For automatci shutdown:
cd /etc/rc0.d
ln -s /etc/init.d/dboracle K10dboracle
For automatic startup:
cd /etc/rc3.d
ln -s /etc/init.d/dboracle S99dboracle
It's important to note that these link names are case sensitive, so follow
your system administrator's established standard.
#===========================================================================
=====
# Name: /etc/init.d/dboracle
# Written by Todd Pepling.
#
# Purpose: Auto-start Oracle services during system boot.
#
# Usage: Designed to be called by 'root' via the symbolic links
#
# /etc/rc0.d/K10dboracle (system shutdown)
# and
# /etc/rc3.d/S99dboracle (system startup)
#
# Can also be run from command line. You need to pass in
either
# "start" or "stop" as a parameter.
# Ex.
# |--------------------------------------------------
# |host:user:> dboracle start
# |--------------------------------------------------
#
# Dependencies: 1) This script is designed to reside in /etc/init.d.
# 2) Script designed to run via Borne shell (not bash or ksh).
# Results of using bsh or ksh constructs can (and likely
will)
# break this script.
#
# Revision Log: (most recent at top)
# 06-29-05 tcp: Created.
#===========================================================================
=====
#-----------------------------------------------------------
# Modify the following for your environment.
# ORACLE_HOME:
# The directory where 'dbstart' and 'dbstop' are located.
# Don't worry if you have mutliple ORACLE_HOMEs. These
# scripts grep through /var/opt/oracle/oratab for each
# ORACLE_SID and set its ORACLE_HOME appropriately.
#
# ORACLE_OWNER:
# User who owns the Oracle binaries.
#
# ORATAB:
# Name/location of oratab file.
#-----------------------------------------------------------
ORATAB=/var/opt/oracle/oratab
ORACLE_HOME=`grep -v "#" $ORATAB | grep "*:/" | cut -d: -f2`
ORACLE_OWNER=oracle
SCRIPT_NAME=`/usr/xpg4/bin/basename $0`
FLAG=$1
FLAG=${FLAG:?"Usage: $SCRIPT_NAME: start|stop "}
typeset -l FLAG
case $FLAG in
start)
#--------------------------------------------------
# Start databases.
#--------------------------------------------------
if [ ! -f $ORACLE_HOME/bin/dbstart ]; then
echo "$SCRIPT_NAME: Can not find '$ORACLE_HOME/bin/dbstart'.
Terminating ..."
echo ""
exit
else
echo "$SCRIPT_NAME: Starting Oracle databases ..."
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart &"
fi
#--------------------------------------------------
# Start listeners.
#--------------------------------------------------
echo "$SCRIPT_NAME: Starting Oracle database listener (default)..."
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start 1521
2>/dev/null &"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start 1522
2>/dev/null &"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start 2>/dev/null &"
#--------------------------------------------------
# Start intelligent agent.
#--------------------------------------------------
echo "$SCRIPT_NAME: Starting Oracle Intelligent Agent ..."
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/agentctl start agent
2>/dev/null &"
;;
stop)
#--------------------------------------------------
# Stop databases.
#--------------------------------------------------
if [ ! -f $ORACLE_HOME/bin/dbshut ]; then
echo "$SCRIPT_NAME: Can not find '$ORACLE_HOME/bin/dbshut'.
Terminating ..."
echo ""
exit
else
echo "$SCRIPT_NAME: Stopping Oracle databases ..."
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut &"
fi
#--------------------------------------------------
# Stop listeners.
#--------------------------------------------------
echo "$SCRIPT_NAME: Stopping Oracle database listener (default) ..."
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop 1521
2>/dev/null &"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop 1522
2>/dev/null &"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop 2>/dev/null &"
#--------------------------------------------------
# Stop intelligent agent.
#--------------------------------------------------
echo "$SCRIPT_NAME: Stopping Oracle Intelligent Agent ..."
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/agentctl stop agent
2>/dev/null &"
;;
*)
echo "$SCRIPT_NAME: '$1' is an invalid parameter value."
echo "Usage: $SCRIPT_NAME start|stop"
echo ""
return 2
esac
echo "------------------------------------------------------------"
echo "$SCRIPT_NAME: Done `date '+%Y-%m-%d_%H%M%S'`"
echo "------------------------------------------------------------"
echo ""
-----Original Message-----
From: siva
[mailto:oracledba-ezmlmshield-x35513382.[Email address protected]
Sent: Wednesday, June 29, 2005 3:33 AM
To: LazyDBA Discussion
Subject: Re: Oracle Startup problem in Sun server 5.9
1. First you should have an entry in /etc/oratab file for that Oracle_home
and Oracle_sid
2.you should configure $ORACLE_HOME/bin/dbstart in /etc/inittab file
(initial services to be started after system bootup)
"Elanchezhiyan Kaliyamoorthy "
<oracledba-ezmlmshield-x38398326.[Email address protected]
06/29/2005 11:49 AM
To
"LazyDBA Discussion" <[Email address protected]
cc
Subject
Oracle Startup problem in Sun server 5.9
Hi,
I installed Oracle 9.2.0.4 in Sun Server 5.9.
I can able to start & shutdown Oracle database manually.
But it is not starting up automatically whenever i restart the Sun Server.
I would like know how to start Oracle database automatically.
Pls give me some ideas.
Thanks in advance
Elan
****************************************************************************
********* EMAIL DISCLAIMER : This email and any files transmitted with it
are confidential and intended solely for the use of the individual or
entity
to whom they are addressed. Any unauthorised distribution or copying is
strictly prohibited. If you receive this transmission in error, please
notify the sender by reply email and then destroy the message. Opinions,
conclusions and other information in this message that do not relate to
official business of Mascon shall be understood to be neither given nor
endorsed by Mascon. Any information contained in this email, when
addressed
to Mascon clients is subject to the terms and conditions in governing
client
contract.
Whilst Mascon takes steps to prevent the transmission of viruses via
e-mail,
we can not guarantee that any email or attachment is free from computer
viruses and you are strongly advised to undertake your own anti-virus
precautions. Mascon grants no warranties regarding performance, use or
quality of any e-mail or attachment and undertakes no liability for loss
or
damage, howsoever caused.
****************************************************************************
*********
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
**************************************************************************************
The information contained in this email is privileged and confidential information intended only for the use of the individual or entity named as recipient. If the reader is not the intended recipient, please be notified that any dissemination, distribution, or copy of this communication is strictly prohibited. If you have received this communication in error, please do not disclose this communication to any other person. Please notify us immediately by telephone and return the original to us at the address indicated above. Thank you
Oracle LazyDBA home page