DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: How to Start Oracle DB and listener automatically

  1. #1
    Join Date
    Jun 2000
    Location
    chennai,tamil nadu,india
    Posts
    159
    Hi,
    I need to know how to start up the database and listener automatically when the server is started.I am having SCO-unixware.

    I found oratab file in /var/opt/oracle/ dir and i changed a line as

    sid:$ORACLE_HOME:Y and i changed the dbstart script pointing this particular oratab file.

    Now tell me how the server recogonize this dbstart program when started.

    Pls. clarify me.

    Thanks
    M.Suresh

  2. #2
    Join Date
    Mar 2001
    Posts
    144
    you need to add start and stop scripts in the rc* directories.

    http://metalink.oracle.com/metalink/...1&p_showHelp=1




  3. #3
    Join Date
    Jun 2000
    Location
    chennai,tamil nadu,india
    Posts
    159
    Fine with the documentation.How about the Listener???

  4. #4
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    same as database, write a shell script, leave un rc.d and add symbolic slink in rc* directories

  5. #5
    Join Date
    Aug 2001
    Posts
    14

    Try it:

    1 open the file '/et/rc.d/rc.local'
    2 append these:
    #modify kernel parameter
    echo 134217728 > /proc/sys/kernel/shmmax
    echo -e "250\t32000\t100\t128" > /proc/sys/kernel/sem
    # startup oracle8.1.7.0.1
    su - oracle -c 'lsnrctl start'
    su - oracle -c 'dbstart'

  6. #6
    Join Date
    May 2002
    Location
    USA
    Posts
    462

    Wink

    I Think if we copy following script file in etc/init.d
    it wil automatically startup and shutdown the database .

    #!/bin/sh
    # Set ORA_HOME to be equivalent to the ORACLE_HOME from
    # which you wish to execute dbstart and dbshut
    # set ORA_OWNER to the user id of the owner of the Oracle
    # database in ORA_HOME

    ORA_HOME=/opt/oracle/product/8.1.7
    ORA_OWNER=oracle

    if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
    then
    echo "Oracle startup: cannot start"
    exit
    fi

    case "$1" in
    'start')
    # Start the Oracle databases:
    su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart &"
    su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start &"
    ;;
    'stop')
    # Stop the TNSlistener
    pid=`/usr/bin/ps -e | /usr/bin/grep tnslsnr | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
    if test "$pid"
    then
    kill $pid
    fi
    # Stop the Oracle databases
    su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &
    ;;
    esac


    ---------------------------------------------------------

    i don't know if this is enough or if we need to add any links .
    siva prakash
    DBA

Posting Permissions

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


Click Here to Expand Forum to Full Width