RE: Automatic Shut-down

RE: Automatic Shut-down

 

  

It should be possible !!!

Here is the script which is for Oracle 10g, u can modify for your DB.
CRON this job as per your requirement.

Automatic starting and stopping of Oracle Database
--------------------------------------------------

cd /var/opt/oracle/oratab
Note: You should then change the 'N' entry to 'Y' for the line with your
database ORACLE_SID.


vi /etc/init.d/dbora.sh

ORACLE_HOME=/export/home/oracle/product/10g export ORACLE_HOME

case $1 in
start)
su - oracle -c $ORACLE_HOME/bin/dbstart
su - oracle -c "$ORACLE_HOME/bin/lsnrctl start"
su - oracle -c "$ORACLE_HOME/bin/emctl start dbconsole"
exit 0
;;

stop)
su - oracle -c "$ORACLE_HOME/bin/emctl stop dbconsole"
su - oracle -c "$ORACLE_HOME/bin/lsnrctl stop"
su - oracle -c $ORACLE_HOME/bin/dbshut
exit 0
;;
esac
echo "Usage: $0 [start|stop]"


chmod 777 dbora


ln -s /etc/init.d/dbora.sh /etc/rc3.d/S12dbora.sh
ln -s /etc/init.d/dbora.sh /etc/rc0.d/K12dbora.sh


-----Original Message-----
From: Bimal Mehta
[mailto:oracledba-ezmlmshield-x38821060.[Email address protected]
Sent: Monday, May 31, 2004 4:05 PM
To: LazyDBA.com Discussion
Subject: Automatic Shut-down


Hii
GURUs
Can anybody guide me....in automatic shut-down of the server as well as
Oracle ..running on the server...
say after 7-30 in evening andf startup in morning 9-00 automatic... ???

is it possible or not ???

TIA
Thanks and regards
Bimal Mehta
System Admin & DBA
Integra Hindustan Control Ltd.
Race Course Circle
Baroda
Voice : 0265 2311772 Ext-109
E-mail : [Email address protected]
http://transportation.bombardier.com




--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: send a blank email to oracledba-[Email address protected]
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
****************************************************************************
This communication contains information, which is confidential and may also
be privileged. It is for the exclusive use of the intended recipient(s). If
you are not the intended recipient(s), please note that any distribution,
printing, copying or use of this communication or the information in it is
strictly prohibited. If you have received this communication in error,
please notify the sender immediately and then destroy any copies of it.
****************************************************************************

Oracle LazyDBA home page