Oracle Startup Script
Well I finally got through the installation error free. Oracle 9i R2 on redhat 9. After the installation the database configuration assistant ran smoothly. I was able to see the listener running, logged on to sqlplus with the default user, and logged back out. The tutorial I used had a start up script to run. I put it in /etc/init.d and have it run at system start up. Problem is it is not starting up properly. Here is the script file:
# Run-level Startup script for the Oracle Instance and Listener
# chkconfig: 345 91 19
# description: Startup/Shutdown Oracle listener and instance
# if the executables do not exist -- display error
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
echo "Oracle startup: cannot start"
# depending on parameter -- startup, shutdown, restart
# of the instance and listener or usage display
case "$1" in
# Oracle listener and instance startup
echo -n "Starting Oracle: "
su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNR -c $ORA_HOME/bin/dbstart
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "
su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNR -c $ORA_HOME/bin/dbshut
rm -f /var/lock/subsys/oracle
echo "Usage: $0 start|stop|restart|reload"
The error I get is: "Usage: $0 start|stop|restart|reload". I understand that this error means that the script is not getting a proper parameter. It should be start, shutdown, or reload/restart. My question is: Does the system supply this script file with the parameter? I would assume so but want to make sure. Next question is: If the system does supply the parameters are start, stop, and restart the correct parameters?
Please take a look at the script file. Everything looks in order to me. The only problem appears to be that the script file is not getting the proper parameter.
|All times are GMT -5. The time now is 01:49 AM.|