Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Automating Database Shutdown and Startup

Abdelhadi_DBAJul 12 2012 — edited Jul 15 2012
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.
This post has been answered by Osama_Mustafa on Jul 12 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 11 2012
Added on Jul 12 2012
50 comments
3,963 views