Find the answer to your Linux question:
Results 1 to 2 of 2
The RHEL 4 server has Oracle and TNS listener services installed. But both the services does not start at boot time causing the server to hang. But if I disable ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    2

    Oracle/TNS listener service does not start during boot


    The RHEL 4 server has Oracle and TNS listener services installed. But both the services does not start at boot time causing the server to hang. But if I disable Oracle and the TNS Listener services from starting up during boot time, the server is boots normally.

    Once the server is rebooted, I can start Oracle and TNS listener services normally and everything is fine.

    Similarly, If I reboot the server and the Oracle and listener services are still running, the server hangs and I would have to go for a cold reboot. But If I stop the Oracle and listener services manually (service oracle/tnslistener stop), the server shuts-down/reboots normally.

    Could anyone of you please troubleshoot this issue for me.

    Thanks
    VS

  2. #2
    Linux Newbie ursusca's Avatar
    Join Date
    Dec 2008
    Location
    Toronto
    Posts
    116
    Hi vsankar,

    You can find nice article about it on oracle-base.com:


    As the root user you can create a file called "/etc/init.d/myoracle"with the contents like this:

    HOSTNAME=myoracleserver.mydomain.com
    ORACLE_HOME=/opt/app/oracle/product/10.2.0/db
    ORACLE_OWNER=oracle
    DATE=`date "+%m/%d/%Y %H:%M"`
    export HOSTNAME ORACLE_HOME ORACLE_OWNER DATE

    if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]; then
    fi

    case "$1" in

    start)

    /sbin/runuser - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart"

    /sbin/runuser - $ORACLE_OWNER -c "lsnrctl start listener"


    #/sbin/runuser - $ORACLE_OWNER -c "emctl start dbconsole"

    # su - $ORACLE_OWNER -c "agentctl start"

    ;;

    stop)


    #/sbin/runuser - $ORACLE_OWNER -c "emctl stop dbconsole"

    # su - $ORACLE_OWNER -c "agentctl stop"


    /sbin/runuser - $ORACLE_OWNER -c "lsnrctl stop listener"

    /sbin/runuser - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut"

    ;;

    *)

    echo $"Usage: $prog {start|stop}"
    exit 1

    esac

    Set it to auto-start:
    chkconfig --add myoracle

    I can write me and I can share my script to you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •