automatic start/shutdown of oracle 10g db
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: automatic start/shutdown of oracle 10g db

  1. #1
    Join Date
    Jul 2010
    Posts
    1

    automatic start/shutdown of oracle 10g db

    Hi,

    I wanted to configure automatic startup/shutdown of oracle database when the machine reboots. Here are the steps i followed for this:

    1. Set the following line in /etc/oratab file:

    PINDB:/u01/app/oracle/product/102:Y

    2. Added dbora script in /etc/init.d directory as below:

    ORACLE_HOME=/u01/app/oracle/product/102
    #
    # Change the value of ORACLE to the login name of the
    # oracle owner at your site.
    #
    ORACLE=oracle

    PATH=${PATH}:$ORACLE_HOME/bin
    HOST=`hostname`
    PLATFORM=`uname`
    export ORACLE_HOME PATH
    #
    if [ ! "$2" = "ORA_DB" ] ; then
    if [ "$PLATFORM" = "HP-UX" ] ; then
    remsh $HOST -l $ORACLE -n "$0 $1 ORA_DB"
    exit
    else
    rsh $HOST -l $ORACLE $0 $1 ORA_DB
    exit
    fi
    fi
    #
    case $1 in
    'start')
    if [ "$PLATFORM" = "Linux" ] ; then
    touch /var/lock/subsys/dbora
    fi
    $ORACLE_HOME/bin/dbstart $ORACLE_HOME &
    ;;
    'stop')
    $ORACLE_HOME/bin/dbshut $ORACLE_HOME &
    ;;
    *)
    echo "usage: $0 {start|stop}"
    exit
    ;;
    esac
    #chkconfig: 2345 90 10
    #description: dbservice
    exit


    Set the permission of dbora to 750.

    3. # ln -s /etc/init.d/dbora /etc/rc.d/rc0.d/K01dbora
    # ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/S99dbora
    # ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S99dbora

    Then i tested this by rebooting the machine. Looks like the script is not getting invoked at all. To just test this invoked the following command through root login

    /u01/app/oracle/product/102/bin/dbstart

    Then iam getting the following error:

    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

    SQL> ERROR:
    ORA-12546: TNSermission denied


    Are there any steps that iam missing here?

    Regards
    Anil

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,001
    You need to do a su oracle -c "startupscript" so
    that the script runs as oracle, not as root.
    this space intentionally left blank

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