Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 09-15-2003, 08:55 PM   #1
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:

# 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"
exit 1

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


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 01:55 PM
How to Startup Oracle Listener In the Linux Cluster Environment research2004 Linux - Enterprise 1 05-02-2004 12:30 AM
Linux Startup Scripts for Oracle Application & Database research2004 Linux - Newbie 1 04-14-2004 06:22 AM
Oracle 9i Start Up Script w/ Redhat 9 linux_pioneer Linux - Software 0 09-17-2003 06:48 AM
Oracle Start Up Script linux_pioneer Linux - Software 1 09-16-2003 06:44 AM

All times are GMT -5. The time now is 12:33 AM.

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