Re: starting the database

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


Other related posts: