LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 09-15-2003, 07:55 PM   #1
linux_pioneer
Member
 
Registered: May 2003
Distribution: Solaris 10, Solaris 8.0, Fedora Core 3
Posts: 203

Rep: Reputation: 30
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:

#!/bin/bash
#
# Run-level Startup script for the Oracle Instance and Listener
#
# chkconfig: 345 91 19
# description: Startup/Shutdown Oracle listener and instance

ORA_HOME="/home/u01/app/oracle/product/9.2.0.1.0"
ORA_OWNR="oracle"

# if the executables do not exist -- display error

if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
echo "Oracle startup: cannot start"
exit 1
fi

# depending on parameter -- startup, shutdown, restart
# of the instance and listener or usage display

case "$1" in
start)
# 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
touch /var/lock/subsys/oracle
echo "OK"
;;
stop)
# 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 "OK"
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 start|stop|restart|reload"
exit 1
esac
exit 0

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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Oracle Startup Script problem deweirdt Linux - Software 2 07-05-2005 12:55 PM
How to Startup Oracle Listener In the Linux Cluster Environment research2004 Linux - Enterprise 1 05-01-2004 11:30 PM
Linux Startup Scripts for Oracle Application & Database research2004 Linux - Newbie 1 04-14-2004 05:22 AM
Oracle 9i Start Up Script w/ Redhat 9 linux_pioneer Linux - Software 0 09-17-2003 05:48 AM
Oracle Start Up Script linux_pioneer Linux - Software 1 09-16-2003 05:44 AM


All times are GMT -5. The time now is 03:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration