有谁知道如何让oracle8.17在linux9下,随系统的开机、关机自动启动或是关闭数据库?
谢谢!

解决方案 »

  1.   

    1. Edit the etc/oratab file.
    Database entries in the oratab file appear in the following format:
    ORACLE_SID:ORACLE_HOME:{Y|N}
    where Y or N specifies whether you want the dbstart and dbshut scripts to
    start up and shut down the database. Find the entries for all the databases that
    you want to start up. They are identified by the sid in the first field. Change
    the last field for each to Y.
    2. Create a file named dbora in the /etc/init.d directory (if it does not already
    exist).
    3. Create entries similar to the following at the end of the dbora file (if they do
    not already exist). Be sure to give the full path of the dbstart utility.
    #!/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=/u01/app/oracle/product/8.1.7
    ORA_OWNER=oracle
    if [! -f $ORA_HOME/bin/dbstart]
    then
    echo "Oracle startup: cannot start"
    exit
    fi
    case "$1" in
    ’start’)
    # Start the Oracle databases:
    # The following command assumes that the oracle login will not prompt the
    # user for any values
    su - $ORA_OWNER -c $ORA_HOME/bin/dbstart &
    ;;
    ’stop’)
    # Stop the Oracle databases:
    # The following command assumes that the oracle login will not prompt the
    # user for any values
    su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &
    ;;
    esac
    4. Link dbora by entering:
    # ln -s /etc/init.d/dbora /etc/rc0.d/K10dbora
    # ln -s /etc/init.d/dbora /etc/rc2.d/S99dbora
      

  2.   

    在启动目录里加上一个文件A
    加入  
      LSNRCTL START
      SVRMGR
      CONNECT INTERNAL
      STARTUP;