Topic: Oracle on Unix/Linux >> How to start and stop Oracle automatically with system reboot?
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| Title: How to start and stop Oracle automatically with system reboot? |
| Puneet |
Posted: Nov 07, 2003 01:59:48 PM |
Total Post: 73
Joined: Mar, 2002
|
Hi Guys,
Can some tell me the procedure to start and stop oracle at the boot time?
I installed oracle 8i on Solaris 8 and now want to setup auto-restart of oracle.
Thanks,
Puneet |
|
|
Vigyan |
| Posted: Nov 07, 2003 02:12:45 PM | |
|
Total Post: 386
Joined: May, 2001
|
Hi Puneet,
Here are few steps that I do to setup autostart of oracle db
Step1.
Create a script called Oracle in /etc/init.d dir.
----- Start
#!/usr/bin/ksh
ORACLE_HOME=/u01/app/oracle/product/8.1.7
case $1 in
start)
su - oracle -c $ORACLE_HOME/bin/dbstart
su - oracle -c "$ORACLE_HOME/bin/lsnrctl start"
exit 0
;;
stop)
su - oracle -c "$ORACLE_HOME/bin/lsnrctl stop"
su - oracle -c $ORACLE_HOME/bin/dbshut
;;
esac
--end--
Create Soft Link:
Start:
ln -s ../init.d/oracle /etc/rc3.d/S95oracle
Stop:
ln -s ../init.d/oracle /etc/rc0.d/K15oracle
chmod 0755 /etc/init.d/oracle
Some people like rc2 but I think non system scripts should be in rc3.
ln -s /var/opt/oracle/oratab /etc/oratab
Note: You should then change the 'N' entry to 'Y' in oratab for the line with your database ORACLE_SID.
Hope it helps.
Regards,
Vigyan Kaushik
http://www.dbapool.com
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 843 |
| Mohammed Taj | 746 |
| positive fanatic | 483 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| Gitesh Trivedi | 322 |
| Gopu Gopi | 272 |
| neeraj sharma | 252 |
| Ramesh Jois | 245 |
| Bishal Khetan | 207 |
|
|