Shell script to make DB up
972710Jan 9 2013 — edited Jan 10 2013Hi all,
I have oracle DB in Amazon EC2. This DB will go down and i have to make it up everyday.
I want to write a shell script that checks the status of DB and make it up.
The things i do is
login as root
su - oracle
sqlplus
user name:
pwd:
If DB is down it shows error.
So i will again do
login as root
./stopPageview
su - oracle
sqlplus
username: sys as sysdba
pwd:
shutdown abort
startup
exit
exit
./startPageview
How to do this automatically using shell script ?
Edited by: 969707 on Jan 9, 2013 4:36 AM