Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automated Startup / Shutdown Trouble 8.1.6 HPUX

Status
Not open for further replies.

tman138

IS-IT--Management
Nov 27, 2001
128
US
I have a new HPUX box running 11i and Oracle 8.1.6
I have 2 automated script files for startup and shutdown that have worked well for many years on my old 11.0 machine. The scripts either start or stop 3 things:
1) A COBOL app that runs batch processes against the Oracle dB (startBat or stopBat)
2) The database itself (dbstart or dbshut)
3) The listener
The COBOL app is owned and executed by cobl.
My start script runs in CRON by root and looks like this:
. /usr/bin/coblenv
# sets the environment for both cobl and oracle
/usr/bin/su - oracle -c $ORACLE_HOME/bin/dbstart
lsnrctl start
# start the batch processor
/usr/bin/su - cobl -c $COBL_HOME/startBat

My shutdown script is similar but the commands run in reverse order and use shutdown commands.
My problem is that I can run each command sucessfully independantly. dbstart launches the database, lsnrctl start launches the listener, and startBat launches the batch processor. However, when I call the startup script, the dbstart runs OK, but lsnrctl stops at the LSNRCTL> prompt and does not automatically pass the 'start' command. At this time I can enter 'start' and have the script continue to my startBat which runs sucessfully. I reviewed my listener.ora file, my initSID.ora file as well as the listener.log but I can't find any reason why the lsnrctl start and stop commands don't take. These scripts are exactly the same as my old production machine except for host name, and port settings. Is there a listener variable somewhere that I am missing? Is there a command to force LSNRCTL to accept a 'start' argument?

 
OK - I figured it out. For some reason on this machine I had to enclose the path and command with arguments as a string literal:
/usr/bin/su - oracle -c "$ORACLE_HOME/bin/lsnrctl start"
and
/usr/bin/su - oracle -c "$ORACLE_HOME/bin/lsnrctl stop"

This works great!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top