LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-04-2005, 04:11 AM   #1
velmots83
LQ Newbie
 
Registered: Aug 2005
Location: Jordan
Posts: 2

Rep: Reputation: 0
Unhappy automatic start oracle10g script


Hi all,
I need to write a script to start and stop oracle10g database and listener automatically when system boots for linux redhat 9.
can anyone help....
thanks
 
Old 04-15-2008, 01:11 AM   #2
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 448

Rep: Reputation: 30
Start Script for Linux:

Start Sc. for Linux
====================
1) sript :

#!/bin/bash
# chkconfig: 345 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.

ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
ORACLE_OWNER=oracle

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

case "$1" in
'start')
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start"
su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbstart
;;
'stop')
# Stop the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbshut
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop"
;;
esac


2)cat /etc/inittab
*:/u01/app/oracle/product/10.2.0/db_1:N
orcl:/u01/app/oracle/product/10.2.0/db_1:Y


3)[root@server ~]# cd /var/opt/oracle/
[root@server oracle]# ls
oratab


4)[root@server init.d]# find / -name dbora
/etc/rc.d/rc3.d/dbora
/etc/rc.d/rc5.d/dbora
/etc/rc.d/init.d/dbora

5)
chmod 750 /etc/init.d/dbora




source :

http://www.oracle-base.com/articles/...ownOnLinux.php
 
  


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
Automatic Start mohtasham1983 Linux - Newbie 2 05-14-2005 06:02 PM
Automatic start of programs? ElPuello Linux - Software 3 04-15-2004 08:15 PM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 01:20 AM
Automatic start of program VincentB Linux - Newbie 1 07-03-2003 04:21 PM
Automatic Script micray Linux - Newbie 1 05-11-2002 05:53 PM


All times are GMT -5. The time now is 06:38 PM.

Main Menu
Advertisement
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