Automating Database Shutdown and Startup
Hi ALL,
I want to Automating Database Shutdown and Startup when os linux start/stop i do the following:
OS version:centos 5
DATABASE version: oracle 11.2.0
su root
1-Edit the #vi /etc/oratabfile :
orcl:/home/oracle/app/oracle/product/11.2.0/dbhome_1:Y
2-cd /etc/init.d and vi dbora
add the following lines to dbora
#!/bin/bash
# chkconfig: 35 99 10
# description: Starts and stops Oracle processes
ORA_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1
ORA_OWNER=oracle
case "$1" in
'start')
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
;;
'stop')
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
;;
esac
3-# chgrp oinstall dbora
4-# chmod 750 dbora
5-# /sbin/chkconfig --add dbora
when i restrat my os and I tried to connect to sqlplus / as sysdba
the output was "you are connected to idle instance ",I forgot something???
Please can you indicate me where is the error?
Thank you in advance.