Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-16-2008, 12:46 AM   #1
Anshul Pathak
LQ Newbie
Registered: Nov 2008
Posts: 3

Rep: Reputation: 0
Oracle boot time startup

I know how to startup Oracle database(connect sys as sysdba with sqlplus; startup; ) but I can do this only manually. What I want is to put this into a script that runs when the server boots. If the server is rebooted I have to manually start the database and I want to make a script to do that for me.
Old 12-16-2008, 07:16 AM   #2
Registered: May 2008
Location: Iceland
Distribution: Ubuntu Hardy
Posts: 47

Rep: Reputation: 16
$ORACLE_HOME/bin/dbstart and dbshut are scripts to start and stop the database
they will also stop and start the tns listener.

You might want to make sure that the dbshut scripts uses "shutdown immediate" instead of shutdown, because that can take forever on busy databases.

Here is a script i snatched, and only needs the correct owner and path to work
and if you are running redhat you can copy the scipt to /etc/init.d and run /sbin/chkconfig --add <script_name>

# chkconfig: 35 99 10
# description: Oracle auto start-stop script.
# Set ORACLE_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
# Set ORACLE_OWNER to the user id of the owner of the
# Oracle database in ORACLE_HOME.
if [ ! -f ${ORACLE_HOME}/bin/dbstart ]
echo "Oracle startup: cannot start"
case "$1" in
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - ${ORACLE_OWNER} -c
if ((ret==0))
echo "OK"
echo "FAILED"
# Stop the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - ${ORACLE_OWNER} -c
if ((ret==0))
echo "OK"
echo "FAILED"


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
mysql startup at boot time tekmann33 Linux - Software 2 06-19-2007 12:46 AM
hot to auto start oracle application server on Redhat AS3 at the boot time procfs Linux - Software 2 05-22-2007 11:42 PM
Help...Kicker Failed at boot time. KDE startup not complete. swamprat SUSE / openSUSE 3 02-04-2007 10:01 AM
How to avoid pppoe connection automatically startup at boot time in UBUNTU? kevin_chn Ubuntu 4 12-31-2006 11:29 PM
make a deamon startup at boot time kernelvn Fedora 4 10-20-2004 06:50 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:38 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