-bash-3.2$ dbstart
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: /u01/app/oracle/product/11.2.0/dbhome_1/bin/dbstart ORACLE_HOME
Processing Database instance "orcl": log file /u01/app/oracle/product/11.2.0/dbhome_1/startup.log
And i try to do the following
-bash-3.2$ export ORACLE_HOME_LISTNER=$ORACLE_HOME
-bash-3.2$ dbstart
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: /u01/app/oracle/product/11.2.0/dbhome_1/bin/dbstart ORACLE_HOME
Processing Database instance "orcl": log file /u01/app/oracle/product/11.2.0/dbhome_1/startup.log
Open dbstart and check the Scripts
# First argument is used to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=$1
if [ ! $ORACLE_HOME_LISTNER ] ; then
echo "ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener"
echo "Usage: $0 ORACLE_HOME"
Try the following Solution , over ride value inside dbstart with the below command
-bash-3.2$ dbstart $ORACLE_HOME
Enjoy
Osama mustafa
Published by Osama Mustafa
Osama considered as one of the leaders in Cloud technology, DevOps and database in the Middle-East. I have more than ten years of experience within the industry. moreover, certfied 4x AWS , 4x Azure and 6x OCI, have also obtained database certifications for multiple providers.
In addition to having experience with Oracle database and Oracle products, such as middle-ware, OID, OAM and OIM, I have gained substantial knowledge with different databases.
Currently, I am architecting and implementing Cloud and DevOps. On top of that, I'm providing solutions for companies that allow them to implement the solutions and to follow the best practices.
View all posts by Osama Mustafa
i want to Automating Database Shutdown and Startup when os linux start/stop i do the following:su root1-Edit the #vi /etc/oratabfile :orcl:/home/oracle/app/oracle/product/11.2.0/dbhome_1:Y2-cd /etc/init.d and vi dboraadd the following lines to dbora#!/bin/bash# chkconfig: 35 99 10# description: Starts and stops Oracle processesORA_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1ORA_OWNER=oraclecase “$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;;esac3-# chgrp oinstall dbora4-# chmod 750 dbora5-# /sbin/chkconfig –add dborawhen i restrat my os and I tried to connect to sqlplus / as sysdbathe output was you are connected to idle instance please osama,I forgot something???
LikeLike
Thnak you in advance
LikeLike
Please Post database version and Os Version
LikeLike
Salem alkiom;thank you osama for reply.OS version:centos 5DATABASE version: oracle 11.2.0
LikeLike
I did it auto start and stop in this way1-Edit the #vi /etc/oratabfile :orcl:/home/oracle/app/oracle/product/11.2.0/dbhome_1:Ythen vi /etc/init.d/oraclepaste this script to it and save#!/bin/bash## oracle This shell script takes care of starting and stopping# the Oracle subsystem (oracle).## chkconfig: – 64 36# description: Oracle database server.# processname: oracle# pidfile: /var/run/oracle/oracle.pid### BEGIN INIT INFO# Provides: oracle# Required-Start: $local_fs $remote_fs $network $named $syslog $time# Required-Stop: $local_fs $remote_fs $network $named $syslog $time# Short-Description: start and stop Oracle server# Description: Oracle database server### END INIT INFO# Source function library.. /etc/rc.d/init.d/functions# Source networking configuration.. /etc/sysconfig/networkstart() { if [ -e /var/lock/subsys/oracle ];then echo “Starting Oracle Enterprise Server” failure else echo “Starting Oracle Enterprise Server” success echo “`date “+%m/%d/%Y %H:%M:%S”` : Starting Oracle Listeners” >> /var/log/oracle/oracle.log su – oracle -c “lsnrctl start” >> /var/log/oracle/oracle.log echo “`date “+%m/%d/%Y %H:%M:%S”` : Starting Oracle Databases” >> /var/log/oracle/oracle.log su – oracle -c “dbstart” >> /var/log/oracle/oracle.log echo “`date “+%m/%d/%Y %H:%M:%S”` : Starting Oracle Enterprise Manager” >> /var/log/oracle/oracle.log su – oracle -c “emctl start dbconsole” >> /var/log/oracle/oracle.log touch /var/lock/subsys/oracle fi}stop() { if [ -f /var/lock/subsys/oracle ];then echo “Shutting Down Oracle Enterprise Server” success echo “`date “+%m/%d/%Y %H:%M:%S”` : Shutting Down Oracle Enterprise Manager” >> /var/log/oracle/oracle.log su – oracle -c “emctl stop dbconsole” >> /var/log/oracle/oracle.log echo “`date “+%m/%d/%Y %H:%M:%S”` : Shutting Down Oracle Listeners” >> /var/log/oracle/oracle.log su – oracle -c “lsnrctl stop” >> /var/log/oracle/oracle.log echo “`date “+%m/%d/%Y %H:%M:%S”` : Shutting Down Oracle Databases” >> /var/log/oracle/oracle.log su – oracle -c “dbshut” >> /var/log/oracle/oracle.log rm -f /var/lock/subsys/oracle else echo “Shutting Down Oracle Enterprise Server” failure fi}case “$1” in start) start ;; stop) stop ;; status) if [ -e /var/lock/subsys/oracle ]; then echo -n “Oracle Enterprise Server is Running” success echo else echo -n “Oracle Enterprise Server is Not Running” failure echo fi ;; restart) stop sleep 2 start ;; *) echo $”Usage: $0 {start|stop|restart|status}” exit 1esacexit 0thenchkconfig –add oraclechkconfig oracle onCheers Your done
LikeLike
There is always another way 🙂 Thanks for sharing
LikeLike
I am getting error as mention below.ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net ListenerUsage: ./dbstart ORACLE_HOMEI have go through As you mention in blog but that did not work for me. Please help me with solution.Operating system: Suse Linux 11Database : Oracle 11g R2
LikeLike
I am trying to Configure oracle on Centos 7. But it's structure is quite different than previous versions of centos. do any one have idea how to enable oracle on system startup?.
LikeLike