For Oracle Grid or ASM environment , the Oracle restart is being used to start the Oracle after the OS startup. However, the Oracle instance does not use the Oracle RAC and ASM, we still need to use dbstart/dbshut to start the oracle.
dbstart and dbshut
Edit the /etc/oratab file
The file contains the Oracle SID and the oracle home directory. The last parameter decide whether dbstart would bring it up or not.
SID: ORACLE_HOME: Y/N
After the ORALCE_SID is set to Y, we can use dbstart to bring up the oracle instance.
Known issue with ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
There is known issue with the dbstart. We would get the error message about “ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener”. The database would startup fine but the listener does not start.
To fix the error, we need to pass the $ORACLE_HOME to the dbstart ..
However, this would only bring up the default listener. I can not find anyway to bring up the named listener via dbstart. I have to create the customize script in the init.d to do this.
Create /etc/init.d/oracle
#!/bin/sh
# chkconfig: 345 99 10
ORA_OWNER=oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0
case "$1" in
'start')
su - $ORA_OWNER -c "$ORACLE_HOME/bin/lsnrctl start LISTENER_ORACLEDB1"
su - $ORA_OWNER -c "$ORACLE_HOME/bin/dbstart"
su - $ORA_OWNER -c "$ORACLE_HOME/bin/emctl start dbconsole"
;;
'stop')
su - $ORA_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop LISTENER_ORACLEDB1"
su - $ORA_OWNER -c "$ORACLE_HOME/bin/emctl stop dbconsole"
su - $ORA_OWNER -c "$ORACLE_HOME/bin/dbshut"
;;
esac
In order for chkconfig to recognize the script, we need to have “# chkconfig: 345 99 10”
chmod 750 oracle
chkconfig --add oracle
chkconfig --list oracle
To test the init.d script, we can use service command
service oracle start
service oracle stop
Thanks Author For posted about oracle
ReplyDeleteVmware Training in Chennai
CCNA Training in Chennai
Angularjs Training in Chennai
Google CLoud Training in Chennai
Red Hat Training in Chennai
Linux Training in Chennai
Rhce Training in Chennai
Great Article IoT Projects for Students
DeleteDeep Learning Projects for Final Year
JavaScript Training in Chennai
JavaScript Training in Chennai
The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training
Nice post keep do posting The Info was too good
ReplyDeleteDevops ONline Training
IT training instiutute
Thanks for sharing the informationNice post keep do posting The Info was too good
Devops ONline Training
IT training instiutute
Thanks for sharing the information
It's a nice article, Which you have shared here about oracle. Your article is very interesting and I really liked the way you expressed your views in this post. Thank you. oracle apps cloud training
ReplyDelete