Showing posts with label start.startup. shutdown. Show all posts
Showing posts with label start.startup. shutdown. Show all posts

Sunday, 24 June 2012

Shell script for startup & shutdown of database

Shutting Down and starting up of Oracle Database using shell scripts:-


1.       vi dbstop.sh
export ORACLE_HOME=/u01/oracle/product/11.1.0/db (Path of Oracle Home)
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=
SID
lsnrctl stop SID
sqlplus "/ as sysdba"<<EOF
shutdown immediate
EOF

2.       vi dbstart.sh
export ORACLE_HOME=/u01/oracle/product/11.1.0/db
export PATH=$ORACLE_HOME/bin:$PATH
lsnrctl start  SID
export ORACLE_SID= SID
sqlplus "/ as sysdba"<<EOF
startup
EOF