Skip to content
March 19, 2013 / doganay

HOW TO AVOID DEFAULT LISTENER TO START

$ ps -ef | grep -i listener
oracle  7869     1   0   Mar 13 ?           2:00 /home/oracle/product/oracle/bin/tnslsnr LISTENER -inherit


If you use non-default listener name (<>LISTENER) and automatic listener, db start and shut scripts (dbstart, dbshut),
you can comment listener lines to avoid the default listener (LISTENER) to start:

dbstart
-------
# The this to bring down Oracle Net Listener
# ORACLE_HOME_LISTNER=$1
# if [ ! $ORACLE_HOME_LISTNER ] ; then
#  echo "ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener"
#  echo "Usage: $0 ORACLE_HOME"
# else
#  LOG=$ORACLE_HOME_LISTNER/listener.log
#  Set the ORACLE_HOME for the Oracle Net Listener, it gets reset to
#  a different ORACLE_HOME for each entry in the oratab.
#  export ORACLE_HOME=$ORACLE_HOME_LISTNER
#  Stop Oracle Net Listener
#  if [ -f $ORACLE_HOME_LISTNER/bin/tnslsnr ] ; then
#   echo "$0: Stoping Oracle Net Listener" >> $LOG 2>&1
#   $ORACLE_HOME_LISTNER/bin/lsnrctl stop >> $LOG 2>&1 &
#  else
#   echo "Failed to auto-stop Oracle Net Listener using $ORACLE_HOME_LISTNER/bin/tnslsnr"
#  fi
# fi

dbshut
------
# The this to bring down Oracle Net Listener
# ORACLE_HOME_LISTNER=$1
# if [ ! $ORACLE_HOME_LISTNER ] ; then
#  echo "ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener"
#  echo "Usage: $0 ORACLE_HOME"
# else
#  LOG=$ORACLE_HOME_LISTNER/listener.log
#
# Set the ORACLE_HOME for the Oracle Net Listener, it gets reset to
# a different ORACLE_HOME for each entry in the oratab.
# export ORACLE_HOME=$ORACLE_HOME_LISTNER
#
# Stop Oracle Net Listener
# if [ -f $ORACLE_HOME_LISTNER/bin/tnslsnr ] ; then
#  echo "$0: Stoping Oracle Net Listener" >> $LOG 2>&1
#  $ORACLE_HOME_LISTNER/bin/lsnrctl stop >> $LOG 2>&1 &
# else
#  echo "Failed to auto-stop Oracle Net Listener using $ORACLE_HOME_LISTNER/bin/tnslsnr"
#  fi
# fi
Advertisements

One Comment

Leave a Comment
  1. My brother recommended I might like this website. He was totally right.

    This post actually made my day. You cann’t imagine just how much time I had spent for this info! Thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: