Home » RDBMS Server » Server Administration » A question about automating listener
A question about automating listener [message #58344] Sun, 17 August 2003 20:25 Go to next message
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 #58355 is a reply to message #58344] Mon, 18 August 2003 06:16 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
no need to create a new script.
every installation comes along dbstart and dbshut scripts
in $ORACLE_HOME/bin.
set your TNS_ADMIN
edit ur oratab file .
add entries to autostart the instance u want
dbstart/ dbshut  will read this oratab.
edit dbstart /dbshut scripts to add one line
lsnrctl start < listener_name > in dbstart
lsnrctl stop  < listener_name > in dbshut
now these scripts will startup / shutdown databases and
listeners.
call these scripts in your system startup routines (rc.d)

Re: A question about automating listener [message #58358 is a reply to message #58355] Mon, 18 August 2003 12:52 Go to previous messageGo to next message
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 Go to previous message
Mahesh Rajendran
Messages: 10707
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&#124Y>:
#
# 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
...
...
...
...

Previous Topic: How to start database in archive log mode?
Next Topic: caching objects
Goto Forum:
  


Current Time: Fri Sep 20 06:57:55 CDT 2024