Home » Infrastructure » Unix » Auto Listener Start/Stop Fails (64Bit RDBMS 9.2.0.4 SunSPARC 5.8 )
icon8.gif  Auto Listener Start/Stop Fails [message #509596] Mon, 30 May 2011 04:33 Go to next message
drovnik
Messages: 34
Registered: January 2011
Location: Gaborone, Botswana
Member

The following is the contents of my
/etc/init.d/dbora



The scripts upon execution just stops at the prompt below which is really awkward and not getting me anywhere.


root@cdmprod # (/etc/init.d) ./dbora start

LSNRCTL for Solaris: Version 9.2.0.4.0 - Production on 30-MAY-2011 11:31:37

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL>



The scripts below


root@prod # (/etc/init.d) more dbora
#!/bin/sh
# ----------------------------------------------------------------------
# File: dbora
# Purpose: Startup Oracle Database(s) defined in
# /var/opt/oracle/oratab
# ----------------------------------------------------------------------

ORACLE_OWNER=oracle; export ORACLE_OWNER
ORACLE_HOME=/u01/app/oracle/product/92040; export ORACLE_HOME

if [ ! -f $ORACLE_HOME/bin/dbstart ]
then
echo "Oracle 9 not started (no dbstart script)"
exit
fi

if [ ! -f $ORACLE_HOME/bin/dbshut ]
then
echo "Oracle 9 not shutdown (no dbshut script)"
exit
fi

case "$1" in
'start') # Start Oracle Database
su $ORACLE_OWNER -c $ORACLE_HOME/bin/lsnrctl start
# su $ORACLE_OWNER -c $ORACLE_HOME/bin/dbstart
;;

'stop') # Stop Oracle Database

# su $ORACLE_OWNER -c $ORACLE_HOME/bin/dbshut
su $ORACLE_OWNER -c $ORACLE_HOME/bin/lsnrctl stop
;;
esac
Re: Auto Listener Start/Stop Fails [message #509607 is a reply to message #509596] Mon, 30 May 2011 07:13 Go to previous messageGo to next message
Frank Naude
Messages: 4410
Registered: April 1998
Senior Member
You probably need quotes around the command:
su $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop"


Also try combinations with "su -" to switch to the user's environment.
Re: Auto Listener Start/Stop Fails [message #509609 is a reply to message #509607] Mon, 30 May 2011 07:38 Go to previous message
drovnik
Messages: 34
Registered: January 2011
Location: Gaborone, Botswana
Member

Thanks ; as suggested it did the trick.

su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop"
Previous Topic: Problems with sysdba and env params
Next Topic: Putty session timeout(2 Merged)
Goto Forum:
  


Current Time: Sun Apr 20 16:37:22 CDT 2014

Total time taken to generate the page: 0.11232 seconds