Go to the FreeLists Home Page Home Signup Help Login
 



[oracle-l] || [Date Prev] [05-2006 Date Index] [Date Next] || [Thread Prev] [05-2006 Thread Index] [Thread Next]

Re: starting the database

  • From: "Radoulov, Dimitre" <cichomitiko@xxxxxxxxx>
  • To: <fred_fred_1@xxxxxxxxxxx>
  • Date: Mon, 1 May 2006 18:11:22 +0200
I'm looking to make a cronjob that will every 5 minutes check if the database is up, and if not, start it. Does anyone have a script that does this available?

Without crontab you could just run:

foracheck() {
sqlplus -s << EOF > /dev/null 2>&1
/ as sysdba
whenever sqlerror exit failure
select null from dual;
exit
EOF
}

forastart() {
sqlplus -s << EOF > /dev/null 2>&1
/ as sysdba
startup
exit
EOF
}


while : do foracheck || forastart sleep 300 done


Just kidding, I would consider Daniel Fink's answer.


Regards,
Dimitre


--
http://www.freelists.org/webpage/oracle-l






[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.