Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

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

  




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 Khokhar843
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Gitesh Trivedi322
  Gopu Gopi272
  neeraj sharma252
  Ramesh Jois245
  Bishal Khetan207






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software