-
Hi,
I have to give a script which is to be put in the cron to be run for a shutdown and startup.
but i'd like to know how to put it in a script and put it in the crontab.
for ex:
setenv ORACLE_SID orcl
svrmgrl
shutdown immediate;
exit
and for startup:
setenv ORACLE_SID orcl
svrmgrl
startup pfile=/u01/..
exit
could someone help me out. its very urgent.
Thanx a lot.
-Dharma.
-
hi
if you want a fast result. This scripts provides from oracle.
The lay on the oracle server under /opt/Oracle8i/bin/
and the scripts are named bay dbstart and dbshut.
Attention the dbshut script has in my eyes a big bug.
The db will only shutdown in the modus shutdown. That means the db wait until all user have looked out. The script mmust be maked better. You must make a shutdown immediate.
This is the fastest answer.
Regards
Thomas Schmidt
-
Hi,
When you start the script from crontab, execute the env variable setting script first and then your start/stop script. The cron entry looks somthing like this;
46 * * * * ksh -c ". /oracle/.../.env_setup.sh; /oracle/.../dbstart.sh
Hope this helps.
Baliga
-
Thank u
found the script and modified, and its done.
Thank u all.
Dharma