Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Posts
    4

    Unanswered: script is not working

    Hi everyone,

    could you please point point out the error in this script? I got this script from the installation guide for Oracle9i runnig on Solaris 9. It does not start the database when the server gets restarted.

    Thank you for help.



    ORA_HOME=/export/home/opt/oracle

    ORA_OWNER=oracle

    HTTP_OWNER=oracle

    if [ ! -f $ORA_HOME/bin/dbstart ]

    then

    echo "Oracle startup: cannot start"

    exit

    fi

    case "$1" in

    'start')

    # Start the Oracle databases and listeners :

    # The following comment assumes that the Oracle

    login

    # will not prompt the user for any values

    su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"

    su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"

    su - $HTTP_OWNER -c "$ORA_HOME/Apache/Apache/bin/apachectl start"

    ;;

    'stop')

    # Stop the Oracle databases:

    # The following comment assumes that the Oracle

    login

    # will not prompt the user for any values

    su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"

    su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut"

    su - $HTTP_OWNER -c "$ORA_HOME/Apache/Apache/bin/apachectl

    stop"

    ;;

    esac

  2. #2
    Join Date
    Jan 2003
    Location
    Russia
    Posts
    8

    Re: script is not working

    how this script is called ? from /etc/init.d,
    you can use echo "@reboot /path/to/your/script" | crontab as root
    and your script will start as your server reboots

Posting Permissions

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