A question about automating listener [message #58344] |
Sun, 17 August 2003 20:25 |
Jadie
Messages: 64 Registered: January 2002
|
Member |
|
|
I installed 9i on Solaris 8. According to the Oracle documentation, I created a script named dbora on /etc/init.d to automate database startup and shutdown. But the listener doesn't start up automatically. Usually how to automate the listener startup on Solaris?
I appreciate any help! Thanks!!!
Jadie
|
|
|
|
Re: A question about automating listener [message #58358 is a reply to message #58355] |
Mon, 18 August 2003 12:52 |
Jadie
Messages: 64 Registered: January 2002
|
Member |
|
|
Thanks Mahesh,
I did add the lines like this:
For dbstart
su - $ORA_OWNER -c $ORACLE_HOME/bin/lsnrctl start &
For dbshut:
su - $ORA_OWNER -c $ORACLE_HOME/bin/lsnrctl stop &
I don't know why the listener does not start up. The listener's name is listener.
Thanks again..
Jadie
|
|
|
Re: A question about automating listener [message #58359 is a reply to message #58358] |
Mon, 18 August 2003 13:42 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
NO NEED TO SU inside dbstart/ dbshut
make use of oratab~ for ORACLE_HOME and oracle_Sid.
just add entry to dbstart / dbshut
and call the script from RC.D
from root do 'su' to call dbstart/dbshut
----------------------------------------------------------------------
these are entries from one our legacy databases
----------------------------------------------------------------------
$ cat /var/opt/oracle/oratab
#
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# 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.
#
#
*:/db/app/oracle/product/8.1.7:N
slims:/db/app/oracle/product/8.1.7:Y
chipdb2:/db/app/oracle/product/8.1.7:Y
sample:/db/app/oracle/product/8.1.7:N
----------------------------------------------------------------------
look in these sample files.
only difference is , this is 8i version.
alter your oratab
and add a single line (bolded) in dbstart / dbhshut
----------------------------------------------------------------------
$ cat dbstart
:
#
# $Header: dbstart.sh.pp 30-may-2000.14:31:07 jboyce Exp $ dbstart.sh.pp Copyr (c) 1991 Oracle
#
###################################
#
# usage: dbstart
#
# This script is used to start ORACLE from /etc/rc(.local).
# It should ONLY be executed as part of the system boot procedure.
#
#####################################
ORATAB=/var/opt/oracle/oratab
[b]lsnrctl start[/b]
case $ORACLE_TRACE in
T) set -x ;;
esac
...
...
...
...
|
|
|