Help answer threads with 0 replies.
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-17-2003, 05:48 AM   #1
Registered: May 2003
Distribution: Solaris 10, Solaris 8.0, Fedora Core 3
Posts: 203

Rep: Reputation: 30
Oracle 9i Start Up Script w/ Redhat 9

I'm running redhat 9 and installed Oracle 9i release 2. I need a start up script so the database and listeners start up everytime I boot up. I've tried a few but get errors each time. Does anyone know of a good start up script for redhat 9 and Oracle 9i R2?

Here is what I've tried:
# starts and stops oracle 9i database, listener & http server
# fix kernel parameters for oracle

#oracle environment
export ORACLE_HOME=/opt/app/oracle/product/9.2
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
export NLS_LANG='american_america.we8iso8859p2'
export ORACLE_SID=ora9ip

export DISPLAY=:0

case $1 in
# fix kernel parameters
echo 250 32000 100 128 > /proc/sys/kernel/sem
echo 536870912 > /proc/sys/kernel/shmmax
echo 4096 > /proc/sys/kernel/shmmni
echo 2097152 > /proc/sys/kernel/shmall
echo 65536 > /proc/sys/kernel/fs/file-max
echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range

# start listener, apache and database
su - "$oracle_user"<<EOF
lsnrctl start
apachectl start
sqlplus /nolog<<EOL
connect / as sysdba

# stop listener, apache and database
su - "$oracle_user"<<EOF
lsnrctl stop
apachectl stop
sqlplus /nolog<<EOL
connect / as sysdba
shutdown immediate

echo "Usage: ora9ip [start|stop]"


and I've also tried this one:

# 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 1st gives me a few compiler errors. This second one gives me the Usage error saying that it does not understand the parameter that rh9 is giving it.


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
How to start oracle 10g jakkals Linux - Software 6 07-24-2005 09:28 AM
Oracle Start Up Script linux_pioneer Linux - Software 1 09-16-2003 05:44 AM
Oracle Startup Script linux_pioneer Linux - Software 0 09-15-2003 07:55 PM
Auto Start Script for Oracle sikandar Linux - Software 0 09-12-2003 10:43 PM
init to Start Oracle GAVollink Linux - Software 0 08-18-2003 03:41 PM

All times are GMT -5. The time now is 12:25 PM.

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 @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration