<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    狼愛上貍

    我胡漢三又回來了

    dbstart&dbshut腳本中的錯誤

    Oracle提供了兩個腳本dbstart和dbshut用來啟動和關閉數據庫.
    這兩個腳本首先讀取oratab(/etc/oratab)文件來決定哪個數據庫是需要自動啟動和關閉,然后啟動和關閉那些數據庫,
    oratab文件通過root.sh創建.

    [oracle@chicago oracle]$ cat /etc/oratab
    #

    # This file is used by ORACLE utilities. It is created by root.sh
    # and updated by the Database Configuration Assistant when creating
    # a database.

    # A colon, ':', is used as the field terminator. A new line terminates
    # the entry. Lines beginning with a pound sign, '#', are comments.
    #
    # Entries are of the form:
    # $ORACLE_SID:$ORACLE_HOME:<N|Y>:
    #
    # The first and second fields are the system identifier and home
    # directory of the database respectively. The third filed indicates
    # to the dbstart utility that the database should , "Y", or should not,
    # "N", be brought up at system boot time.
    #
    # Multiple entries with the same $ORACLE_SID are not allowed.
    #
    #
    orcl:/u01/app/oracle/oracle/product/10.2.0/db_1:Y

    不過,dbstart/dbshut腳本中都包含有錯誤.
    需要修改ORACLE_HOME_LISTNER=$ORACLE_HOME
    [oracle@chicago oracle]$ dbstart
    ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
    Usage: /u01/app/oracle/oracle/product/10.2.0/db_1/bin/dbstart ORACLE_HOME

    [oracle@chicago oracle]$ vi $ORACLE_HOME/bin/dbstart

    :
    #
    # $Id: dbstart.sh.pp 25-may-2005.14:52:00 vikrkuma Exp $
    # Copyright (c) 1991, 2005, Oracle. All rights reserved.
    #

    ###################################
    #
    # usage: dbstart $ORACLE_HOME
    #
    # This script is used to start ORACLE from /etc/rc(.local).
    # It should ONLY be executed as part of the system boot procedure.
    #
    # This script will start all databases listed in the oratab file
    # whose third field is a "Y". If the third field is set to "Y" and
    # there is no ORACLE_SID for an entry (the first field is a *),
    # then this script will ignore that entry.
    #
    # This script requires that ASM ORACLE_SID's start with a +, and
    # that non-ASM instance ORACLE_SID's do not start with a +.
    #
    # If ASM instances are to be started with this script, it cannot
    # be used inside an rc*.d directory, and should be invoked from
    # rc.local only. Otherwise, the CSS service may not be available
    # yet, and this script will block init from completing the boot
    # cycle.
    #
    # If you want dbstart to auto-start a single-instance database that uses
    # an ASM server that is auto-started by CRS (this is the default behavior
    # for an ASM cluster), you must change the database's ORATAB entry to use
    # a third field of "W" and the ASM's ORATAB entry to use a third field of "N".
    # These values specify that dbstart auto-starts the database only after
    # the ASM instance is up and running.
    #
    # Note:
    # Use ORACLE_TRACE=T for tracing this script.
    #
    # The progress log for each instance bringup plus Error and Warning message[s]
    # are logged in file $ORACLE_HOME/startup.log. The error messages related to
    # instance bringup are also logged to syslog (system log module).
    # The Listener log is located at $ORACLE_HOME_LISTNER/listener.log
    #
    # To configure:
    # 1) Set ORATAB:
    # On Solaris
    # ORATAB=/var/opt/oracle/oratab
    # All other UNIX platforms
    # ORATAB=/etc/oratab
    #
    # 2) Update $ORATAB/oratab with Database Instances that need to be started up.
    # Entries are of the form:
    # $ORACLE_SID:$ORACLE_HOME:<N|Y|W>:
    # An example entry:
    # main:/usr/lib/oracle/emagent_10g:Y
    #
    # Overall algorithm:
    # 1) Bring up all ASM instances with 'Y' entry in status field in oratab entry
    # 2) Bring up all Database instances with 'Y' entry in status field in
    # oratab entry
    # 3) If there are Database instances with 'W' entry in status field
    # then
    # iterate over all ASM instances (irrespective of 'Y' or 'N') AND
    # wait for all of them to be started
    # fi
    # 4) Bring up all Database instances with 'W' entry in status field in
    # oratab entry
    #
    #####################################

    LOGMSG="logger -puser.alert -s "

    trap 'exit' 1 2 3

    # for script tracing
    case $ORACLE_TRACE in
    T) set -x ;;
    esac

    # Set path if path not set (if called from /etc/rc)
    case $PATH in
    "") PATH=/bin:/usr/bin:/etc
    export PATH ;;
    esac
    # Save LD_LIBRARY_PATH
    SAVE_LLP=$LD_LIBRARY_PATH

    # First argument is used to bring up Oracle Net Listener
    ORACLE_HOME_LISTNER=$ORACLE_HOME
    if [ ! $ORACLE_HOME_LISTNER ] ; then
    echo "ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener"
    echo "Usage: $0 ORACLE_HOME"
    else
    LOG=$ORACLE_HOME_LISTNER/listener.log

    # Start Oracle Net Listener
    if [ -x $ORACLE_HOME_LISTNER/bin/tnslsnr ] ; then
    echo "$0: Starting Oracle Net Listener" >> $LOG 2>&1
    "/u01/app/oracle/oracle/product/10.2.0/db_1/bin/dbstart" 461L, 13926C written
    [oracle@chicago oracle]$ dbstart
    Processing Database instance "orcl": log file /u01/app/oracle/oracle/product/10.2.0/db_1/startup.log
    [oracle@chicago oracle]$ dbshut
    ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener
    Usage: /u01/app/oracle/oracle/product/10.2.0/db_1/bin/dbshut ORACLE_HOME
    Processing Database instance "orcl": log file /u01/app/oracle/oracle/product/10.2.0/db_1/shutdown.log
    [oracle@chicago oracle]$ vi $ORACLE_HOME/bin/dbshut

    :
    #
    # $Id: dbshut.sh.pp 11-may-2005.19:37:00 vikrkuma Exp $
    # Copyright (c) 1991, 2005, Oracle. All rights reserved.
    #

    ###################################
    #
    # usage: dbshut $ORACLE_HOME
    #
    # This script is used to shutdown ORACLE from /etc/rc(.local).
    # It should ONLY be executed as part of the system boot procedure.
    #
    # This script will shutdown all databases listed in the oratab file
    # whose third field is a "Y" or "W". If the third field is set to "Y" and
    # there is no ORACLE_SID for an entry (the first field is a *),
    # then this script will ignore that entry.
    #
    # This script requires that ASM ORACLE_SID's start with a +, and
    # that non-ASM instance ORACLE_SID's do not start with a +.
    #
    # Note:
    # Use ORACLE_TRACE=T for tracing this script.
    # Oracle Net Listener is also shutdown using this script.
    #
    # The progress log for each instance shutdown is logged in file
    # $ORACLE_HOME/shutdown.log.
    #
    # To configure:
    # 1) Set ORATAB:
    # On Solaris
    # ORATAB=/var/opt/oracle/oratab
    # All other UNIX platforms
    # ORATAB=/etc/oratab
    #
    # 2) Update $ORATAB/oratab with Database Instances that need to be shutdown.
    # Entries are of the form:
    # $ORACLE_SID:$ORACLE_HOME:<N|Y>:
    # An example entry:
    # main:/usr/lib/oracle/emagent_10g:Y
    #
    # Note:
    # Use ORACLE_TRACE=T for tracing this script.
    # Oracle Net Listener is NOT shutdown using this script.
    #
    # The progress log for each instance shutdown is logged in file
    # $ORACLE_HOME/shutdown.log.
    #
    # To configure:
    # 1) Set ORATAB:
    # On Solaris
    # ORATAB=/var/opt/oracle/oratab
    # All other UNIX platforms
    # ORATAB=/etc/oratab
    #
    # 2) Update $ORATAB/oratab with Database Instances that need to be shutdown.
    # Entries are of the form:
    # $ORACLE_SID:$ORACLE_HOME:<N|Y>:
    # An example entry:
    # main:/usr/lib/oracle/emagent_10g:Y
    #
    #####################################

    trap 'exit' 1 2 3
    case $ORACLE_TRACE in
    T) set -x ;;
    esac
    # Set path if path not set (if called from /etc/rc)
    case $PATH in
    "") PATH=/bin:/usr/bin:/etc
    export PATH ;;
    esac
    # Save LD_LIBRARY_PATH
    SAVE_LLP=$LD_LIBRARY_PATH

    # The this to bring down Oracle Net Listener
    ORACLE_HOME_LISTNER=$ORACLE_HOME
    if [ ! $ORACLE_HOME_LISTNER ] ; then
    echo "ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener"
    echo "Usage: $0 ORACLE_HOME"
    else
    LOG=$ORACLE_HOME_LISTNER/listener.log

    # Stop Oracle Net Listener
    if [ -f $ORACLE_HOME_LISTNER/bin/tnslsnr ] ; then
    "/u01/app/oracle/oracle/product/10.2.0/db_1/bin/dbshut" 246L, 6592C written
    [oracle@chicago oracle]$ dbstart
    Processing Database instance "orcl": log file /u01/app/oracle/oracle/product/10.2.0/db_1/startup.log
    [oracle@chicago oracle]$ dbshut
    Processing Database instance "orcl": log file /u01/app/oracle/oracle/product/10.2.0/db_1/shutdown.log
    [oracle@chicago oracle]$

    來自:http://benbo.itpub.net/post/26034/311306

    posted on 2008-05-02 17:30 狼愛上貍 閱讀(2084) 評論(3)  編輯  收藏 所屬分類: LINUXORACLE

    評論

    # re: dbstart&dbshut腳本中的錯誤[未登錄] 2008-12-31 14:40 jerry

    其實腳本是沒有錯誤的。
    你運行dbstart $ORACLE_HOME
    dbshut $ORACLE_HOME即可。
    它約定的語法就是這樣的。  回復  更多評論   

    # re: dbstart&dbshut腳本中的錯誤 2009-05-03 18:48 cntoen

    ###################################
    #
    # usage: dbstart $ORACLE_HOME
      回復  更多評論   

    # re: dbstart&dbshut腳本中的錯誤 2010-08-02 23:54 erh

    謝謝,修改過腳本后問題解決。
    用dbstart $ORACLE_HOME 我這兒會報同樣的錯,改腳本后不報錯,啟動也正常  回復  更多評論   

    主站蜘蛛池模板: 手机在线免费视频| 亚洲精品第一国产综合亚AV| 青娱分类视频精品免费2| 国产一级a毛一级a看免费人娇| 亚洲经典千人经典日产| 亚洲国产精品专区| 国产AV无码专区亚洲Av| 国产三级电影免费观看| 无人影院手机版在线观看免费| 99精品在线免费观看| 91在线免费观看| 亚洲黄片手机免费观看| 青青免费在线视频| 亚洲av成人中文无码专区| 亚洲精品天堂在线观看| 亚洲精品视频久久| 久久精品国产亚洲AV电影| 亚洲国产精品特色大片观看完整版| 又黄又爽一线毛片免费观看| 成年女人永久免费观看片| 嫩草视频在线免费观看| 毛片高清视频在线看免费观看| 国产精品久久久久久久久免费| 日韩午夜理论免费TV影院| 黄色免费在线网站| 麻豆精品不卡国产免费看| 国产一区二区三区免费观看在线| av午夜福利一片免费看久久| xxxx日本在线播放免费不卡| 久青草国产免费观看| 午夜免费国产体验区免费的| 一级毛片a免费播放王色电影 | 亚洲第一永久在线观看| 久久精品九九亚洲精品| 99久久亚洲精品无码毛片| 亚洲精品国产情侣av在线| 亚洲国产视频网站| 最新亚洲精品国偷自产在线| 亚洲成a∧人片在线观看无码| 亚洲A∨精品一区二区三区下载| 国产精品亚洲专区一区|